diff --git a/composer.json b/composer.json index 6bd6404197..5dc3f557fc 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "ext-curl": "*", "ext-openssl": "*", - "appwrite/appwrite": "23.*", + "appwrite/appwrite": "24.*", "utopia-php/database": "5.*", "utopia-php/storage": "2.*", "utopia-php/dsn": "0.2.*", diff --git a/composer.lock b/composer.lock index ab0a68c73c..d4a75bb02a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "44746ecb1183e23d963fc90b1481541a", + "content-hash": "d500f176f703c97758a1fc200f0ace55", "packages": [ { "name": "appwrite/appwrite", - "version": "23.1.0", + "version": "24.1.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-for-php.git", - "reference": "2f275921f10ceb7cff99f2d463f7328b296234fa" + "reference": "dcb3550a3332de1c1665a015a09e9c73ff515e4f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/2f275921f10ceb7cff99f2d463f7328b296234fa", - "reference": "2f275921f10ceb7cff99f2d463f7328b296234fa", + "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/dcb3550a3332de1c1665a015a09e9c73ff515e4f", + "reference": "dcb3550a3332de1c1665a015a09e9c73ff515e4f", "shasum": "" }, "require": { @@ -43,10 +43,10 @@ "support": { "email": "team@appwrite.io", "issues": "https://github.com/appwrite/sdk-for-php/issues", - "source": "https://github.com/appwrite/sdk-for-php/tree/23.1.0", + "source": "https://github.com/appwrite/sdk-for-php/tree/24.1.0", "url": "https://appwrite.io/support" }, - "time": "2026-05-08T13:44:58+00:00" + "time": "2026-05-20T09:37:03+00:00" }, { "name": "brick/math", diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index 0b8e5f09e6..b475f97545 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -5,14 +5,14 @@ namespace Utopia\Migration\Destinations; use Appwrite\AppwriteException; use Appwrite\Client; use Appwrite\Enums\Adapter; -use Appwrite\Enums\AuthMethod; +use Appwrite\Enums\ProjectAuthMethodId; use Appwrite\Enums\BuildRuntime; use Appwrite\Enums\Compression; use Appwrite\Enums\Framework; use Appwrite\Enums\PasswordHash; -use Appwrite\Enums\ProtocolId; +use Appwrite\Enums\ProjectProtocolId; use Appwrite\Enums\Runtime; -use Appwrite\Enums\ServiceId; +use Appwrite\Enums\ProjectServiceId; use Appwrite\Enums\SmtpEncryption; use Appwrite\InputFile; use Appwrite\Services\Functions; @@ -3199,9 +3199,9 @@ class Appwrite extends Destination protected function createProtocols(Protocols $resource): bool { $flags = [ - [ProtocolId::REST(), $resource->getRest()], - [ProtocolId::GRAPHQL(), $resource->getGraphql()], - [ProtocolId::WEBSOCKET(), $resource->getWebsocket()], + [ProjectProtocolId::REST(), $resource->getRest()], + [ProjectProtocolId::GRAPHQL(), $resource->getGraphql()], + [ProjectProtocolId::WEBSOCKET(), $resource->getWebsocket()], ]; foreach ($flags as [$protocol, $enabled]) { @@ -3230,23 +3230,23 @@ class Appwrite extends Destination protected function createServices(ServicesResource $resource): bool { $flags = [ - [ServiceId::ACCOUNT(), $resource->getAccount()], - [ServiceId::AVATARS(), $resource->getAvatars()], - [ServiceId::DATABASES(), $resource->getDatabases()], - [ServiceId::TABLESDB(), $resource->getTablesdb()], - [ServiceId::LOCALE(), $resource->getLocale()], - [ServiceId::HEALTH(), $resource->getHealth()], - [ServiceId::PROJECT(), $resource->getProject()], - [ServiceId::STORAGE(), $resource->getStorage()], - [ServiceId::TEAMS(), $resource->getTeams()], - [ServiceId::USERS(), $resource->getUsers()], - [ServiceId::VCS(), $resource->getVcs()], - [ServiceId::SITES(), $resource->getSites()], - [ServiceId::FUNCTIONS(), $resource->getFunctions()], - [ServiceId::PROXY(), $resource->getProxy()], - [ServiceId::GRAPHQL(), $resource->getGraphql()], - [ServiceId::MIGRATIONS(), $resource->getMigrations()], - [ServiceId::MESSAGING(), $resource->getMessaging()], + [ProjectServiceId::ACCOUNT(), $resource->getAccount()], + [ProjectServiceId::AVATARS(), $resource->getAvatars()], + [ProjectServiceId::DATABASES(), $resource->getDatabases()], + [ProjectServiceId::TABLESDB(), $resource->getTablesdb()], + [ProjectServiceId::LOCALE(), $resource->getLocale()], + [ProjectServiceId::HEALTH(), $resource->getHealth()], + [ProjectServiceId::PROJECT(), $resource->getProject()], + [ProjectServiceId::STORAGE(), $resource->getStorage()], + [ProjectServiceId::TEAMS(), $resource->getTeams()], + [ProjectServiceId::USERS(), $resource->getUsers()], + [ProjectServiceId::VCS(), $resource->getVcs()], + [ProjectServiceId::SITES(), $resource->getSites()], + [ProjectServiceId::FUNCTIONS(), $resource->getFunctions()], + [ProjectServiceId::PROXY(), $resource->getProxy()], + [ProjectServiceId::GRAPHQL(), $resource->getGraphql()], + [ProjectServiceId::MIGRATIONS(), $resource->getMigrations()], + [ProjectServiceId::MESSAGING(), $resource->getMessaging()], ]; foreach ($flags as [$service, $enabled]) { @@ -3352,13 +3352,13 @@ class Appwrite extends Destination protected function createAuthMethods(AuthMethods $resource): bool { $flags = [ - [AuthMethod::EMAILPASSWORD(), $resource->getEmailPassword()], - [AuthMethod::MAGICURL(), $resource->getMagicURL()], - [AuthMethod::EMAILOTP(), $resource->getEmailOtp()], - [AuthMethod::ANONYMOUS(), $resource->getAnonymous()], - [AuthMethod::INVITES(), $resource->getInvites()], - [AuthMethod::JWT(), $resource->getJwt()], - [AuthMethod::PHONE(), $resource->getPhone()], + [ProjectAuthMethodId::EMAILPASSWORD(), $resource->getEmailPassword()], + [ProjectAuthMethodId::MAGICURL(), $resource->getMagicURL()], + [ProjectAuthMethodId::EMAILOTP(), $resource->getEmailOtp()], + [ProjectAuthMethodId::ANONYMOUS(), $resource->getAnonymous()], + [ProjectAuthMethodId::INVITES(), $resource->getInvites()], + [ProjectAuthMethodId::JWT(), $resource->getJwt()], + [ProjectAuthMethodId::PHONE(), $resource->getPhone()], ]; foreach ($flags as [$method, $enabled]) {