-
Notifications
You must be signed in to change notification settings - Fork 3
Add Sites migration support #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
premtsd-code
wants to merge
4
commits into
main
Choose a base branch
from
feat/sites-migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f001664
feat: add Sites migration support
premtsd-code 54a4cb7
use available Framework enum values from SDK
premtsd-code 20d8d11
fix Sites SDK parameter order and use Adapter enum
premtsd-code a84c354
fix site deployment response handling and activate type
premtsd-code File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Appwrite PHP SDK v19.0.0 Framework enum💡 Result:
In Appwrite PHP SDK
19.0.0(tagged Dec 2, 2025) the Sites service’sframeworkparameter is typed using the Framework enum (namespaceAppwrite\Enums). (github.com)Usage pattern (as shown in the PHP Sites API docs):
(appwrite.io)
The enum values correspond to the frameworks Appwrite Sites supports (and “Other”), e.g. Next.js, Nuxt, SvelteKit, Angular, Astro, Remix, TanStack Start, Flutter Web, React Native, Other JavaScript. (appwrite.io)
Citations:
🌐 Web query:
Appwrite PHP SDK v19.0.0 BuildRuntime enum Flutter💡 Result:
v19.0.0exists as the Composer packageappwrite/appwrite(with newer versions available, e.g.19.1.0). [1]flutter pub get,flutter build web ..., output./build/web). [2]1.8.1self-hosted release notes/changelog, so upgrading your Appwrite server may be relevant. [4]If you share the exact PHP call you’re making (which Sites API method + parameters), I can tell you what field maps to
buildRuntimeand what values your SDK exposes for it.Sources: [1] Packagist
appwrite/appwrite(PHP SDK versions) • [2] Appwrite Docs: Deploy a Flutter Web app to Sites • [3] Appwrite Thread: “missing buildRuntime” for Flutter Sites • [4] Appwrite changelog: Appwrite 1.8.1 (“Updated Flutter default build runtime”)🏁 Script executed:
Repository: utopia-php/migration
Length of output: 95
🏁 Script executed:
Repository: utopia-php/migration
Length of output: 639
🌐 Web query:
Appwrite PHP SDK v19.0.0 GitHub Framework enum class definition REACTNATIVE TANSTACKSTART💡 Result:
In Appwrite PHP SDK
19.0.0, there is noFrameworkenum class in the repo (so you won’t find enum values likeREACTNATIVEorTANSTACKSTARTthere). The19.0.0code at commitb0a3ffdshows only these enums undersrc/Appwrite/Enums:BuildRuntime,Runtime,TemplateReferenceType,VCSReferenceType. [1]Also, the Sites PHP API reference shows
use Appwrite\Enums\;andframework: ::ANALOG()(i.e., the docs intend an enum usage), but it doesn’t correspond to an actualFrameworkenum shipped in PHP SDK19.0.0. [2]If you’re trying to select React Native or TanStack Start as an Appwrite Sites “framework”, that’s a Sites feature/framework key, and TanStack Start support is documented on the Sites side (not via a PHP SDK enum in
19.0.0). [3]Sources:
[1] appwrite/sdk-for-php@b0a3ffd
[2] https://appwrite.io/docs/references/cloud/server-php/sites
[3] https://appwrite.io/changelog/entry/2025-10-28
🌐 Web query:
Appwrite PHP SDK v19.0.0 GitHub BuildRuntime enum FLUTTER methods💡 Result:
Appwrite PHP SDK
19.0.0is a real tagged release (published Dec 3, 2025) inappwrite/sdk-for-php. In its GitHub release notes,19.0.0mentions enum/service changes like renamingVCSDeploymentType→VCSReferenceType, changingcreateTemplateDeploymentparameters, and addingTheme,Timezone, andOutputenums—but it does not mentionBuildRuntimespecifically. [1]Packagist also lists
appwrite/appwriteversion19.0.0(same codebase asappwrite/sdk-for-php). [2]If you’re trying to find the
BuildRuntimeenum’s Flutter-related entries/methods inv19.0.0, the authoritative place is the SDK source at tag19.0.0, typically under something likesrc/Appwrite/Enums/BuildRuntime.phpin the repo. [3]Sources
[1] https://github.com/appwrite/sdk-for-php/releases (see “19.0.0”)
[2] https://packagist.org/packages/appwrite/appwrite
[3] https://github.com/appwrite/sdk-for-php/tree/19.0.0
🌐 Web query:
Appwrite PHP SDK v19.0.0 BuildRuntime enum source code methods💡 Result:
In Appwrite PHP SDK
19.0.0(composer packageappwrite/appwrite), theBuildRuntimeenum lives at:src/Appwrite/Enums/BuildRuntime.php(github.com)Because it’s an auto-generated “enum class” (not a native PHP 8.1
enum), its “enum values” are exposed as static methods on the class (e.g.BuildRuntime::SOME_RUNTIME()returning a string value).How to get the exact method list (from the v19.0.0 source you have installed)
Or, from your project root:
sed -n '1,200p' vendor/appwrite/appwrite/src/Appwrite/Enums/BuildRuntime.phpThat file is the source of truth for the complete list of
BuildRuntime::...()methods inv19.0.0. (github.com)Citations:
🌐 Web query:
Appwrite PHP SDK Framework enum when introduced first version💡 Result:
Appwrite’s Enum support (the SDK feature that adds enum/enum-like types) was announced on Feb 28, 2024. [1]
For the Appwrite PHP SDK, enum support was first shipped in v17.2.0, released on Oct 3, 2025 (“introduces support of enums in response models”). [2]
So, the first PHP SDK version where a
Frameworkenum (or any other newly generated enums) could appear is:17.2.0. [2]Sources:
[1] https://appwrite.io/changelog/entry/2024-02-28
[2] https://github.com/appwrite/sdk-for-php/releases/tag/17.2.0
🏁 Script executed:
Repository: utopia-php/migration
Length of output: 274
🌐 Web query:
Appwrite PHP SDK v19.1.0 Framework enum💡 Result:
In Appwrite PHP SDK
19.1.0(appwrite/appwriteon Packagist), there is noFrameworkenum shipped with the SDK. [1]Appwrite’s official SDK docs list the enums that are generated/available (OAuth providers, authenticator types, browsers, index types, image format/gravity, function runtime, etc.), and “Framework” is not one of them. [2]
So if you’re looking for a “framework” parameter (e.g.,
laravel,symfony, etc.), you’ll need to pass it as a plain string (if a specific API expects it) or define your own enum/constants in your app.Sources:
[1] https://packagist.org/packages/appwrite/appwrite
[2] https://appwrite.io/docs/sdks
🌐 Web query:
Appwrite PHP SDK latest version Framework enum Adapter enum💡 Result:
appwrite/appwrite): 19.1.0 (released 2025-12-18). (packagist.org)Appwrite\Enums\Framework(used for Sitesframework:likeFramework::ANALOG()). (appwrite.io)Appwrite\Enums\Adapter(used for Sitesadapter:likeAdapter::STATIC()). Allowed adapter values are static and ssr (enum helpers:Adapter::STATIC()/Adapter::SSR()). (appwrite.io)Example (from Sites API docs, PHP):
(appwrite.io)
Citations:
🏁 Script executed:
Repository: utopia-php/migration
Length of output: 125
🏁 Script executed:
Repository: utopia-php/migration
Length of output: 46
🌐 Web query:
site:github.com appwrite/sdk-for-php Framework enum class💡 Result:
In
appwrite/sdk-for-phpthere is noFrameworkenum/class (i.e., noAppwrite\Enums\Framework).Appwrite’s docs list the SDK enum types that are generated/provided (authenticator type/name, OAuth provider, browsers, credit cards, image gravity/format, relationship types, SMTP encryption, function runtime, messaging provider type, compression algorithms, execution methods, country flags, etc.), and “framework” is not one of them. [1]
Source:
appwrite/sdk-for-phpis the official PHP SDK repo referenced by Appwrite/Packagist. [2]References:
[1] (appwrite.io)
[2] (packagist.org)
Citations:
🌐 Web query:
site:github.com appwrite/sdk-for-php/releases Framework enum Sites support💡 Result:
As of the latest Appwrite PHP SDK release (19.1.0, Dec 18, 2025), the release notes don’t mention adding any Sites “Framework” enum (or updating enums for Sites framework selection) — the only listed change is about creating columns/indexes synchronously when creating a table. (github.com)
Also, Appwrite’s SDK documentation lists the kinds of enums the SDKs provide (auth providers, runtimes, etc.) and does not list a Sites “Framework” enum. (appwrite.io)
If you’re looking for the supported Appwrite Sites frameworks (Next.js, Nuxt, SvelteKit, etc.), they’re documented in the Sites “Frameworks” page. (appwrite.io)
Citations:
🏁 Script executed:
Repository: utopia-php/migration
Length of output: 429
🌐 Web query:
site:github.com/appwrite/sdk-for-php "class Framework" enums💡 Result:
A web search for
site:github.com/appwrite/sdk-for-php "class Framework"doesn’t turn up any matches in theappwrite/sdk-for-phprepository (it’s also marked read-only). [1]However, Appwrite’s Sites PHP API reference shows that the PHP SDK does expose a framework enum-like type as
Appwrite\Enums\Framework, used likeFramework::ANALOG()when creating/updating a Site. [2]🌐 Web query:
Appwrite PHP SDK when will Framework enum be added Sites API💡 Result:
As of the latest released Appwrite PHP SDK on Packagist (appwrite/appwrite 19.1.0, released Dec 18, 2025), the Sites API “framework” enum (e.g.,
Framework::ANALOG) is not yet available in the PHP SDK (the PHP Sites docs still show blank enum imports likeuse Appwrite\Enums\;forframework). [1] [2]There’s currently an open PR in
appwrite/sdk-for-php— #57 “Updates: sync as per latest cloud specs” (opened Jan 14, 2026) — which is the likely vehicle for adding missing/updated spec items like the Sites framework enum, but no ETA is published; it will land when that PR is merged and a new PHP SDK release is cut. [3]Workaround until then: pass the
frameworkvalue as the raw string expected by the API (e.g.,"analog") instead of an enum. [2]Sources:
[1] https://packagist.org/packages/appwrite/appwrite (release info + repo link)
[2] https://appwrite.io/docs/references/cloud/server-php/sites (PHP Sites API reference showing missing enum import)
[3] https://github.com/appwrite/sdk-for-php/pulls (shows PR
#57opened Jan 14, 2026)Remove
Frameworkenum usage or constrain SDK version to post-Framework support release.The
Frameworkenum (Appwrite\Enums\Framework) does not exist in Appwrite PHP SDK v19.0.0 or v19.1.0. The import statement will cause a fatal "Class not found" error, preventing the entire migration class from loading. The Appwrite PHP SDK team is working to add Sites framework enum support (PR#57, opened Jan 14, 2026), but no release with this enum is currently available.Either:
'analog','flutter','react') until the SDK adds the enum.The same validation should apply to
AdapterandBuildRuntimeenums to ensure they are fully supported in the installed SDK version before use.🤖 Prompt for AI Agents