From 1319bf7ec1532026b20c1753c2767499668922db Mon Sep 17 00:00:00 2001 From: Khushboo Verma Date: Sat, 21 Jun 2025 01:41:41 +0400 Subject: [PATCH 01/26] Fix connect to existing repo flow --- docker-compose.yml | 2 +- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0b653af8c2..51d54a7d78 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -213,7 +213,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:6.0.41 + image: appwrite/console:6.1.2 restart: unless-stopped networks: - appwrite diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index 8ff1690da9..67bbe2dbef 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -445,7 +445,7 @@ class Builds extends Action Console::execute('rsync -av --exclude \'.git\' ' . \escapeshellarg($tmpTemplateDirectory . '/' . $templateRootDirectory . '/') . ' ' . \escapeshellarg($tmpDirectory . '/' . $rootDirectory), '', $stdout, $stderr); // Commit and push - $exit = Console::execute('git config --global user.email "team@appwrite.io" && git config --global user.name "Appwrite" && cd ' . \escapeshellarg($tmpDirectory) . ' && git add . && git commit -m "Create ' . \escapeshellarg($resource->getAttribute('name', '')) . ' function" && git push origin ' . \escapeshellarg($branchName), '', $stdout, $stderr); + $exit = Console::execute('git config --global user.email "team@appwrite.io" && git config --global user.name "Appwrite" && cd ' . \escapeshellarg($tmpDirectory) . ' && git checkout -b ' . \escapeshellarg($branchName) . ' && git add . && git commit -m "Create ' . \escapeshellarg($resource->getAttribute('name', '')) . ' function" && git push origin ' . \escapeshellarg($branchName), '', $stdout, $stderr); if ($exit !== 0) { throw new \Exception('Unable to push code repository: ' . $stderr); From 47594076962227290a2b0a304d3c892e120d6aaf Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 24 Jun 2025 14:57:30 +0400 Subject: [PATCH 02/26] chore: update composer.json and composer.lock to include appwrite-labs/php-amqplib and adjust utopia-php/queue version --- composer.json | 2 +- composer.lock | 215 +++++++++++++++++++++++++++----------------------- 2 files changed, 119 insertions(+), 98 deletions(-) diff --git a/composer.json b/composer.json index 4c36ab125d..4dc877d69e 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,7 @@ "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", "utopia-php/preloader": "0.2.*", - "utopia-php/queue": "0.11.0", + "utopia-php/queue": "dev-feat-swoole-amqp-adapter as 0.11.1", "utopia-php/registry": "0.5.*", "utopia-php/storage": "0.18.*", "utopia-php/swoole": "0.8.*", diff --git a/composer.lock b/composer.lock index bb80539305..ed085f92e9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "55bc52686a08d64930e6af7411ac0654", + "content-hash": "783e4b89e54e4d58f3c177c1a700da7c", "packages": [ { "name": "adhocore/jwt", @@ -67,6 +67,99 @@ ], "time": "2025-02-18T01:00:50+00:00" }, + { + "name": "appwrite-labs/php-amqplib", + "version": "0.1.0", + "source": { + "type": "git", + "url": "https://github.com/appwrite-labs/php-amqplib.git", + "reference": "30d709df7510e784d16ad7a7f817d26fe79615a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appwrite-labs/php-amqplib/zipball/30d709df7510e784d16ad7a7f817d26fe79615a0", + "reference": "30d709df7510e784d16ad7a7f817d26fe79615a0", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-sockets": "*", + "php": "^7.2||^8.0", + "phpseclib/phpseclib": "^2.0|^3.0" + }, + "conflict": { + "php": "7.4.0 - 7.4.1" + }, + "replace": { + "php-amqplib/php-amqplib": "self.version", + "videlalvaro/php-amqplib": "self.version" + }, + "require-dev": { + "ext-curl": "*", + "nategood/httpful": "^0.2.20", + "phpunit/phpunit": "^7.5|^9.5", + "squizlabs/php_codesniffer": "^3.6", + "swoole/ide-helper": "^5.0" + }, + "suggest": { + "ext-swoole": "For Swoole coroutine support" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpAmqpLib\\": "PhpAmqpLib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Appwrite Labs", + "email": "team@appwrite.io", + "role": "Fork Maintainer" + }, + { + "name": "Alvaro Videla", + "role": "Original Maintainer" + }, + { + "name": "Raúl Araya", + "email": "nubeiro@gmail.com", + "role": "Maintainer" + }, + { + "name": "Luke Bakken", + "email": "luke@bakken.io", + "role": "Maintainer" + }, + { + "name": "Ramūnas Dronga", + "email": "github@ramuno.lt", + "role": "Maintainer" + } + ], + "description": "Fork of php-amqplib with Swoole coroutine support. A pure PHP implementation of the AMQP protocol tested against RabbitMQ.", + "homepage": "https://github.com/appwrite-labs/php-amqplib/", + "keywords": [ + "async", + "coroutine", + "message", + "queue", + "rabbitmq", + "swoole" + ], + "support": { + "source": "https://github.com/appwrite-labs/php-amqplib/tree/0.1.0" + }, + "time": "2025-06-13T21:45:04+00:00" + }, { "name": "appwrite/appwrite", "version": "11.1.0", @@ -1631,87 +1724,6 @@ }, "time": "2020-10-15T08:29:30+00:00" }, - { - "name": "php-amqplib/php-amqplib", - "version": "v3.7.3", - "source": { - "type": "git", - "url": "https://github.com/php-amqplib/php-amqplib.git", - "reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/9f50fe69a9f1a19e2cb25596a354d705de36fe59", - "reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-sockets": "*", - "php": "^7.2||^8.0", - "phpseclib/phpseclib": "^2.0|^3.0" - }, - "conflict": { - "php": "7.4.0 - 7.4.1" - }, - "replace": { - "videlalvaro/php-amqplib": "self.version" - }, - "require-dev": { - "ext-curl": "*", - "nategood/httpful": "^0.2.20", - "phpunit/phpunit": "^7.5|^9.5", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpAmqpLib\\": "PhpAmqpLib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Alvaro Videla", - "role": "Original Maintainer" - }, - { - "name": "Raúl Araya", - "email": "nubeiro@gmail.com", - "role": "Maintainer" - }, - { - "name": "Luke Bakken", - "email": "luke@bakken.io", - "role": "Maintainer" - }, - { - "name": "Ramūnas Dronga", - "email": "github@ramuno.lt", - "role": "Maintainer" - } - ], - "description": "Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.", - "homepage": "https://github.com/php-amqplib/php-amqplib/", - "keywords": [ - "message", - "queue", - "rabbitmq" - ], - "support": { - "issues": "https://github.com/php-amqplib/php-amqplib/issues", - "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.7.3" - }, - "time": "2025-02-18T20:11:13+00:00" - }, { "name": "php-http/discovery", "version": "1.20.0", @@ -1874,16 +1886,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.44", + "version": "3.0.45", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9" + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/1d0b5e7e1434678411787c5a0535e68907cf82d9", - "reference": "1d0b5e7e1434678411787c5a0535e68907cf82d9", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", "shasum": "" }, "require": { @@ -1964,7 +1976,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.44" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" }, "funding": [ { @@ -1980,7 +1992,7 @@ "type": "tidelift" } ], - "time": "2025-06-15T09:59:26+00:00" + "time": "2025-06-22T22:54:43+00:00" }, { "name": "psr/container", @@ -4251,21 +4263,21 @@ }, { "name": "utopia-php/queue", - "version": "0.11.0", + "version": "dev-feat-swoole-amqp-adapter", "source": { "type": "git", "url": "https://github.com/utopia-php/queue.git", - "reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5" + "reference": "080639c0cd05abf5d897c1486825cf74c1ad1961" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5", - "reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/080639c0cd05abf5d897c1486825cf74c1ad1961", + "reference": "080639c0cd05abf5d897c1486825cf74c1ad1961", "shasum": "" }, "require": { + "appwrite-labs/php-amqplib": "0.1.0", "php": ">=8.3", - "php-amqplib/php-amqplib": "^3.7", "utopia-php/cli": "0.15.*", "utopia-php/fetch": "0.4.*", "utopia-php/framework": "0.33.*", @@ -4311,9 +4323,9 @@ ], "support": { "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.11.0" + "source": "https://github.com/utopia-php/queue/tree/feat-swoole-amqp-adapter" }, - "time": "2025-05-30T09:52:38+00:00" + "time": "2025-06-24T10:55:47+00:00" }, { "name": "utopia-php/registry", @@ -8231,9 +8243,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/queue", + "version": "dev-feat-swoole-amqp-adapter", + "alias": "0.11.1", + "alias_normalized": "0.11.1.0" + } + ], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/queue": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From fe080153e6405579500c324583392be8953fbe0a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 24 Jun 2025 15:28:07 +0400 Subject: [PATCH 03/26] chore: update benchmark workflow to use JSON output format --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6d73787d00..ba55a4a88b 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -78,7 +78,7 @@ jobs: docker compose up -d sleep 10 - name: Benchmark Latest - run: oha -z 180s http://localhost/v1/health/version -j > benchmark-latest.json + run: oha -z 180s http://localhost/v1/health/version --output-format json > benchmark-latest.json - name: Prepare comment run: | echo '## :sparkles: Benchmark results' > benchmark.txt From b646eb7758eb3d3b73e129b8ef2ed5c71310c042 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 25 Jun 2025 00:23:21 +0400 Subject: [PATCH 04/26] chore: update composer.json and composer.lock to upgrade utopia-php/queue to version 0.12.0 and appwrite-labs/php-amqplib to version 0.1.1 --- composer.json | 2 +- composer.lock | 55 +++++++++++++++++++++------------------------------ 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/composer.json b/composer.json index 4dc877d69e..76b7146b96 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,7 @@ "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", "utopia-php/preloader": "0.2.*", - "utopia-php/queue": "dev-feat-swoole-amqp-adapter as 0.11.1", + "utopia-php/queue": "^0.12.0", "utopia-php/registry": "0.5.*", "utopia-php/storage": "0.18.*", "utopia-php/swoole": "0.8.*", diff --git a/composer.lock b/composer.lock index ed085f92e9..4c0a92d3af 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "783e4b89e54e4d58f3c177c1a700da7c", + "content-hash": "dbd3be6cce9f2a5e551be564cdabcbe5", "packages": [ { "name": "adhocore/jwt", @@ -69,16 +69,16 @@ }, { "name": "appwrite-labs/php-amqplib", - "version": "0.1.0", + "version": "0.1.1", "source": { "type": "git", "url": "https://github.com/appwrite-labs/php-amqplib.git", - "reference": "30d709df7510e784d16ad7a7f817d26fe79615a0" + "reference": "bd380cbd63c8c0f063a3893b7a0b889d40876861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite-labs/php-amqplib/zipball/30d709df7510e784d16ad7a7f817d26fe79615a0", - "reference": "30d709df7510e784d16ad7a7f817d26fe79615a0", + "url": "https://api.github.com/repos/appwrite-labs/php-amqplib/zipball/bd380cbd63c8c0f063a3893b7a0b889d40876861", + "reference": "bd380cbd63c8c0f063a3893b7a0b889d40876861", "shasum": "" }, "require": { @@ -156,9 +156,9 @@ "swoole" ], "support": { - "source": "https://github.com/appwrite-labs/php-amqplib/tree/0.1.0" + "source": "https://github.com/appwrite-labs/php-amqplib/tree/0.1.1" }, - "time": "2025-06-13T21:45:04+00:00" + "time": "2025-06-24T18:12:57+00:00" }, { "name": "appwrite/appwrite", @@ -4108,16 +4108,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.8", + "version": "0.7.9", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "e3a4536c46f10988b1a446ec6b8dd8a9914be854" + "reference": "b061f523513b071ef7168e6dc1441364eb73f308" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/e3a4536c46f10988b1a446ec6b8dd8a9914be854", - "reference": "e3a4536c46f10988b1a446ec6b8dd8a9914be854", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/b061f523513b071ef7168e6dc1441364eb73f308", + "reference": "b061f523513b071ef7168e6dc1441364eb73f308", "shasum": "" }, "require": { @@ -4126,7 +4126,7 @@ "php": ">=8.0", "utopia-php/cli": "0.15.*", "utopia-php/framework": "0.33.*", - "utopia-php/queue": "0.11.*" + "utopia-php/queue": "^0.12.0" }, "require-dev": { "laravel/pint": "1.*", @@ -4152,9 +4152,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.8" + "source": "https://github.com/utopia-php/platform/tree/0.7.9" }, - "time": "2025-05-30T10:05:43+00:00" + "time": "2025-06-24T20:21:05+00:00" }, { "name": "utopia-php/pools", @@ -4263,20 +4263,20 @@ }, { "name": "utopia-php/queue", - "version": "dev-feat-swoole-amqp-adapter", + "version": "0.12.0", "source": { "type": "git", "url": "https://github.com/utopia-php/queue.git", - "reference": "080639c0cd05abf5d897c1486825cf74c1ad1961" + "reference": "3a7603ee712c592bfc54af4a76f0426c428b5574" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/080639c0cd05abf5d897c1486825cf74c1ad1961", - "reference": "080639c0cd05abf5d897c1486825cf74c1ad1961", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/3a7603ee712c592bfc54af4a76f0426c428b5574", + "reference": "3a7603ee712c592bfc54af4a76f0426c428b5574", "shasum": "" }, "require": { - "appwrite-labs/php-amqplib": "0.1.0", + "appwrite-labs/php-amqplib": "^0.1", "php": ">=8.3", "utopia-php/cli": "0.15.*", "utopia-php/fetch": "0.4.*", @@ -4323,9 +4323,9 @@ ], "support": { "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/feat-swoole-amqp-adapter" + "source": "https://github.com/utopia-php/queue/tree/0.12.0" }, - "time": "2025-06-24T10:55:47+00:00" + "time": "2025-06-24T18:58:38+00:00" }, { "name": "utopia-php/registry", @@ -8243,18 +8243,9 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [ - { - "package": "utopia-php/queue", - "version": "dev-feat-swoole-amqp-adapter", - "alias": "0.11.1", - "alias_normalized": "0.11.1.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/queue": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From 63a02e11ac30f9a6d3063837531798ebc0d73737 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 27 Jun 2025 18:42:02 +0400 Subject: [PATCH 05/26] Fix default value assignment in Mapper class to handle null cases --- src/Appwrite/GraphQL/Types/Mapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index 3c7915bc96..db330034b3 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -226,7 +226,7 @@ class Mapper ]; if (!$rule['required']) { - $fields[$escapedKey]['defaultValue'] = $rule['default']; + $fields[$escapedKey]['defaultValue'] = $rule['default'] ?? ''; } } From d6326758a8cabca9ab96e6b5b4ffe5c61c58ec51 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 30 Jun 2025 20:58:00 +0400 Subject: [PATCH 06/26] patch: increase cache ttl to ensure hits --- app/controllers/shared/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 735487339f..58b0f9a8a9 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -564,7 +564,7 @@ App::init() $cache = new Cache( new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId()) ); - $timestamp = 60 * 60 * 24 * 30; + $timestamp = 60 * 60 * 24 * 180; // Temporarily increase the TTL to 180 day to ensure files in the cache are still fetched. $data = $cache->load($key, $timestamp); if (!empty($data) && !$cacheLog->isEmpty()) { From fd7628efe84308b6c04b17cb6fa2f48854f32149 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 30 Jun 2025 21:03:30 +0400 Subject: [PATCH 07/26] refactor: streamline cache handling in App::shutdown() and ensure file modification time updates --- app/controllers/shared/api.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 58b0f9a8a9..76fe177b0b 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -564,7 +564,7 @@ App::init() $cache = new Cache( new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId()) ); - $timestamp = 60 * 60 * 24 * 180; // Temporarily increase the TTL to 180 day to ensure files in the cache are still fetched. + $timestamp = 60 * 60 * 24 * 180; // Temporarily increase the TTL to 180 day to ensure files in the cache are still fetched. $data = $cache->load($key, $timestamp); if (!empty($data) && !$cacheLog->isEmpty()) { @@ -831,6 +831,10 @@ App::shutdown() $resourceType = $parseLabel($pattern, $responsePayload, $requestParams, $user); } + $cache = new Cache( + new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId()) + ); + $key = $request->cacheIdentifier(); $signature = md5($data['payload']); $cacheLog = Authorization::skip(fn () => $dbForProject->getDocument('cache', $key)); @@ -848,12 +852,11 @@ App::shutdown() } elseif (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_CACHE_UPDATE)) > $accessedAt) { $cacheLog->setAttribute('accessedAt', $now); Authorization::skip(fn () => $dbForProject->updateDocument('cache', $cacheLog->getId(), $cacheLog)); + // Overwrite the file every APP_CACHE_UPDATE seconds to update the file modified time that is used in the TTL checks in cache->load() + $cache->save($key, $data['payload']); } if ($signature !== $cacheLog->getAttribute('signature')) { - $cache = new Cache( - new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId()) - ); $cache->save($key, $data['payload']); } } From 609e1adcf02a7facc35b40539c8a100ca1afba11 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 30 Jun 2025 22:27:18 -0400 Subject: [PATCH 08/26] Catch --- app/controllers/api/users.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index d7def69464..b3ae17dc91 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -649,6 +649,8 @@ App::get('/v1/users') $total = $dbForProject->count('users', $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $response->dynamic(new Document([ 'users' => $users, From 98dccf6d15ae8f20a182429d922ffce6b7b10cce Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 30 Jun 2025 22:27:29 -0400 Subject: [PATCH 09/26] Map null on missing default --- src/Appwrite/GraphQL/Types/Mapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index db330034b3..347642e5a1 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -226,7 +226,7 @@ class Mapper ]; if (!$rule['required']) { - $fields[$escapedKey]['defaultValue'] = $rule['default'] ?? ''; + $fields[$escapedKey]['defaultValue'] = $rule['default'] ?? null; } } From a1af742c4b2b812c56c25a57e42403436d397d60 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 30 Jun 2025 22:28:09 -0400 Subject: [PATCH 10/26] Update lock --- composer.json | 2 +- composer.lock | 54 +++++++++++++++++++++++++-------------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/composer.json b/composer.json index 76b7146b96..073e667cdb 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,7 @@ "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", "utopia-php/preloader": "0.2.*", - "utopia-php/queue": "^0.12.0", + "utopia-php/queue": "0.12.*", "utopia-php/registry": "0.5.*", "utopia-php/storage": "0.18.*", "utopia-php/swoole": "0.8.*", diff --git a/composer.lock b/composer.lock index 2ac0062d6d..985f2187b8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dbd3be6cce9f2a5e551be564cdabcbe5", + "content-hash": "beacba1fc087db3ab9f9d718b28c5876", "packages": [ { "name": "adhocore/jwt", @@ -1890,16 +1890,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.45", + "version": "3.0.46", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", "shasum": "" }, "require": { @@ -1980,7 +1980,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" }, "funding": [ { @@ -1996,7 +1996,7 @@ "type": "tidelift" } ], - "time": "2025-06-22T22:54:43+00:00" + "time": "2025-06-26T16:29:55+00:00" }, { "name": "psr/container", @@ -2559,16 +2559,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9" + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/57e4fb86314015a695a750ace358d07a7e37b8a9", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9", + "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", "shasum": "" }, "require": { @@ -2580,6 +2580,7 @@ }, "conflict": { "amphp/amp": "<2.5", + "amphp/socket": "<1.1", "php-http/discovery": "<1.15", "symfony/http-foundation": "<6.4" }, @@ -2592,7 +2593,6 @@ "require-dev": { "amphp/http-client": "^4.2.1|^5.0", "amphp/http-tunnel": "^1.0|^2.0", - "amphp/socket": "^1.1", "guzzlehttp/promises": "^1.4|^2.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", @@ -2634,7 +2634,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.0" + "source": "https://github.com/symfony/http-client/tree/v7.3.1" }, "funding": [ { @@ -2650,7 +2650,7 @@ "type": "tidelift" } ], - "time": "2025-05-02T08:23:16+00:00" + "time": "2025-06-28T07:58:39+00:00" }, { "name": "symfony/http-client-contracts", @@ -2972,16 +2972,16 @@ }, { "name": "tbachert/spi", - "version": "v1.0.3", + "version": "v1.0.5", "source": { "type": "git", "url": "https://github.com/Nevay/spi.git", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a" + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nevay/spi/zipball/506a79c98e1a51522e76ee921ccb6c62d52faf3a", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a", + "url": "https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002", + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002", "shasum": "" }, "require": { @@ -2999,7 +2999,7 @@ "extra": { "class": "Nevay\\SPI\\Composer\\Plugin", "branch-alias": { - "dev-main": "0.2.x-dev" + "dev-main": "1.0.x-dev" }, "plugin-optional": true }, @@ -3018,9 +3018,9 @@ ], "support": { "issues": "https://github.com/Nevay/spi/issues", - "source": "https://github.com/Nevay/spi/tree/v1.0.3" + "source": "https://github.com/Nevay/spi/tree/v1.0.5" }, - "time": "2025-04-02T19:38:14+00:00" + "time": "2025-06-29T15:42:06+00:00" }, { "name": "thecodingmachine/safe", @@ -7267,16 +7267,16 @@ }, { "name": "symfony/console", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", + "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", "shasum": "" }, "require": { @@ -7341,7 +7341,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.0" + "source": "https://github.com/symfony/console/tree/v7.3.1" }, "funding": [ { @@ -7357,7 +7357,7 @@ "type": "tidelift" } ], - "time": "2025-05-24T10:34:04+00:00" + "time": "2025-06-27T19:55:54+00:00" }, { "name": "symfony/filesystem", From 385e4e14b881d4755e7aa9bf5fd69a2f931b68ac Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 1 Jul 2025 17:33:11 +0530 Subject: [PATCH 11/26] add: delay, retries. --- .../Databases/DatabasesCustomServerTest.php | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php index e84c760c86..b38b1202c6 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomServerTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomServerTest.php @@ -1470,9 +1470,24 @@ class DatabasesCustomServerTest extends Scope $this->assertCount(64, $collection['body']['attributes']); $this->assertCount(0, $collection['body']['indexes']); - foreach ($collection['body']['attributes'] as $attribute) { - $this->assertEquals('available', $attribute['status'], 'attribute: ' . $attribute['key']); - } + $this->assertEventually(function () use ($databaseId, $collectionId) { + $collection = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + foreach ($collection['body']['attributes'] ?? [] as $attribute) { + $this->assertEquals( + 'available', + $attribute['status'], + 'attribute: ' . $attribute['key'] + ); + } + + return true; + }, 60000, 500); + // Test indexLimit = 64 // MariaDB, MySQL, and MongoDB create 6 indexes per new collection From 4d0bd1d74fb0d572b3838aca9526123f0a101e61 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 1 Jul 2025 18:10:19 +0530 Subject: [PATCH 12/26] add: delay, retries. --- tests/e2e/Services/Databases/DatabasesBase.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index e34691839d..a9a6c6e1db 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -1414,9 +1414,20 @@ trait DatabasesBase $this->assertEquals($releaseYearIndex['body']['key'], $movies['body']['indexes'][1]['key']); $this->assertEquals($releaseWithDate1['body']['key'], $movies['body']['indexes'][2]['key']); $this->assertEquals($releaseWithDate2['body']['key'], $movies['body']['indexes'][3]['key']); - foreach ($movies['body']['indexes'] as $index) { - $this->assertEquals('available', $index['status']); - } + + $this->assertEventually(function () use ($databaseId, $data) { + $movies = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $data['moviesId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + foreach ($movies['body']['indexes'] as $index) { + $this->assertEquals('available', $index['status']); + } + + return true; + }, 60000, 500); return $data; } From 99ccd64b4c9418c51e172857974b441b47cb4982 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 1 Jul 2025 18:24:05 -0400 Subject: [PATCH 13/26] =?UTF-8?q?Revert=20"chore:=20update=20composer.json?= =?UTF-8?q?=20and=20composer.lock=20to=20include=20appwrite-lab=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/users.php | 2 - composer.json | 2 +- composer.lock | 256 ++++++++++++-------------- src/Appwrite/GraphQL/Types/Mapper.php | 2 +- 4 files changed, 124 insertions(+), 138 deletions(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index b3ae17dc91..d7def69464 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -649,8 +649,6 @@ App::get('/v1/users') $total = $dbForProject->count('users', $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); - } catch (QueryException $e) { - throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $response->dynamic(new Document([ 'users' => $users, diff --git a/composer.json b/composer.json index 073e667cdb..4c36ab125d 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,7 @@ "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", "utopia-php/preloader": "0.2.*", - "utopia-php/queue": "0.12.*", + "utopia-php/queue": "0.11.0", "utopia-php/registry": "0.5.*", "utopia-php/storage": "0.18.*", "utopia-php/swoole": "0.8.*", diff --git a/composer.lock b/composer.lock index 985f2187b8..05c8a49512 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "beacba1fc087db3ab9f9d718b28c5876", + "content-hash": "55bc52686a08d64930e6af7411ac0654", "packages": [ { "name": "adhocore/jwt", @@ -67,99 +67,6 @@ ], "time": "2025-02-18T01:00:50+00:00" }, - { - "name": "appwrite-labs/php-amqplib", - "version": "0.1.1", - "source": { - "type": "git", - "url": "https://github.com/appwrite-labs/php-amqplib.git", - "reference": "bd380cbd63c8c0f063a3893b7a0b889d40876861" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/appwrite-labs/php-amqplib/zipball/bd380cbd63c8c0f063a3893b7a0b889d40876861", - "reference": "bd380cbd63c8c0f063a3893b7a0b889d40876861", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-sockets": "*", - "php": "^7.2||^8.0", - "phpseclib/phpseclib": "^2.0|^3.0" - }, - "conflict": { - "php": "7.4.0 - 7.4.1" - }, - "replace": { - "php-amqplib/php-amqplib": "self.version", - "videlalvaro/php-amqplib": "self.version" - }, - "require-dev": { - "ext-curl": "*", - "nategood/httpful": "^0.2.20", - "phpunit/phpunit": "^7.5|^9.5", - "squizlabs/php_codesniffer": "^3.6", - "swoole/ide-helper": "^5.0" - }, - "suggest": { - "ext-swoole": "For Swoole coroutine support" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpAmqpLib\\": "PhpAmqpLib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Appwrite Labs", - "email": "team@appwrite.io", - "role": "Fork Maintainer" - }, - { - "name": "Alvaro Videla", - "role": "Original Maintainer" - }, - { - "name": "Raúl Araya", - "email": "nubeiro@gmail.com", - "role": "Maintainer" - }, - { - "name": "Luke Bakken", - "email": "luke@bakken.io", - "role": "Maintainer" - }, - { - "name": "Ramūnas Dronga", - "email": "github@ramuno.lt", - "role": "Maintainer" - } - ], - "description": "Fork of php-amqplib with Swoole coroutine support. A pure PHP implementation of the AMQP protocol tested against RabbitMQ.", - "homepage": "https://github.com/appwrite-labs/php-amqplib/", - "keywords": [ - "async", - "coroutine", - "message", - "queue", - "rabbitmq", - "swoole" - ], - "support": { - "source": "https://github.com/appwrite-labs/php-amqplib/tree/0.1.1" - }, - "time": "2025-06-24T18:12:57+00:00" - }, { "name": "appwrite/appwrite", "version": "11.1.0", @@ -1728,6 +1635,87 @@ }, "time": "2020-10-15T08:29:30+00:00" }, + { + "name": "php-amqplib/php-amqplib", + "version": "v3.7.3", + "source": { + "type": "git", + "url": "https://github.com/php-amqplib/php-amqplib.git", + "reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/9f50fe69a9f1a19e2cb25596a354d705de36fe59", + "reference": "9f50fe69a9f1a19e2cb25596a354d705de36fe59", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-sockets": "*", + "php": "^7.2||^8.0", + "phpseclib/phpseclib": "^2.0|^3.0" + }, + "conflict": { + "php": "7.4.0 - 7.4.1" + }, + "replace": { + "videlalvaro/php-amqplib": "self.version" + }, + "require-dev": { + "ext-curl": "*", + "nategood/httpful": "^0.2.20", + "phpunit/phpunit": "^7.5|^9.5", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "PhpAmqpLib\\": "PhpAmqpLib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Alvaro Videla", + "role": "Original Maintainer" + }, + { + "name": "Raúl Araya", + "email": "nubeiro@gmail.com", + "role": "Maintainer" + }, + { + "name": "Luke Bakken", + "email": "luke@bakken.io", + "role": "Maintainer" + }, + { + "name": "Ramūnas Dronga", + "email": "github@ramuno.lt", + "role": "Maintainer" + } + ], + "description": "Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.", + "homepage": "https://github.com/php-amqplib/php-amqplib/", + "keywords": [ + "message", + "queue", + "rabbitmq" + ], + "support": { + "issues": "https://github.com/php-amqplib/php-amqplib/issues", + "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.7.3" + }, + "time": "2025-02-18T20:11:13+00:00" + }, { "name": "php-http/discovery", "version": "1.20.0", @@ -1890,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.46", + "version": "3.0.45", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", - "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", "shasum": "" }, "require": { @@ -1980,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" }, "funding": [ { @@ -1996,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-26T16:29:55+00:00" + "time": "2025-06-22T22:54:43+00:00" }, { "name": "psr/container", @@ -2559,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.1", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" + "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", + "url": "https://api.github.com/repos/symfony/http-client/zipball/57e4fb86314015a695a750ace358d07a7e37b8a9", + "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9", "shasum": "" }, "require": { @@ -2580,7 +2568,6 @@ }, "conflict": { "amphp/amp": "<2.5", - "amphp/socket": "<1.1", "php-http/discovery": "<1.15", "symfony/http-foundation": "<6.4" }, @@ -2593,6 +2580,7 @@ "require-dev": { "amphp/http-client": "^4.2.1|^5.0", "amphp/http-tunnel": "^1.0|^2.0", + "amphp/socket": "^1.1", "guzzlehttp/promises": "^1.4|^2.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", @@ -2634,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.1" + "source": "https://github.com/symfony/http-client/tree/v7.3.0" }, "funding": [ { @@ -2650,7 +2638,7 @@ "type": "tidelift" } ], - "time": "2025-06-28T07:58:39+00:00" + "time": "2025-05-02T08:23:16+00:00" }, { "name": "symfony/http-client-contracts", @@ -2972,16 +2960,16 @@ }, { "name": "tbachert/spi", - "version": "v1.0.5", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/Nevay/spi.git", - "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002" + "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002", - "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002", + "url": "https://api.github.com/repos/Nevay/spi/zipball/506a79c98e1a51522e76ee921ccb6c62d52faf3a", + "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a", "shasum": "" }, "require": { @@ -2999,7 +2987,7 @@ "extra": { "class": "Nevay\\SPI\\Composer\\Plugin", "branch-alias": { - "dev-main": "1.0.x-dev" + "dev-main": "0.2.x-dev" }, "plugin-optional": true }, @@ -3018,9 +3006,9 @@ ], "support": { "issues": "https://github.com/Nevay/spi/issues", - "source": "https://github.com/Nevay/spi/tree/v1.0.5" + "source": "https://github.com/Nevay/spi/tree/v1.0.3" }, - "time": "2025-06-29T15:42:06+00:00" + "time": "2025-04-02T19:38:14+00:00" }, { "name": "thecodingmachine/safe", @@ -4111,16 +4099,16 @@ }, { "name": "utopia-php/platform", - "version": "0.7.9", + "version": "0.7.8", "source": { "type": "git", "url": "https://github.com/utopia-php/platform.git", - "reference": "b061f523513b071ef7168e6dc1441364eb73f308" + "reference": "e3a4536c46f10988b1a446ec6b8dd8a9914be854" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/platform/zipball/b061f523513b071ef7168e6dc1441364eb73f308", - "reference": "b061f523513b071ef7168e6dc1441364eb73f308", + "url": "https://api.github.com/repos/utopia-php/platform/zipball/e3a4536c46f10988b1a446ec6b8dd8a9914be854", + "reference": "e3a4536c46f10988b1a446ec6b8dd8a9914be854", "shasum": "" }, "require": { @@ -4129,7 +4117,7 @@ "php": ">=8.0", "utopia-php/cli": "0.15.*", "utopia-php/framework": "0.33.*", - "utopia-php/queue": "^0.12.0" + "utopia-php/queue": "0.11.*" }, "require-dev": { "laravel/pint": "1.*", @@ -4155,9 +4143,9 @@ ], "support": { "issues": "https://github.com/utopia-php/platform/issues", - "source": "https://github.com/utopia-php/platform/tree/0.7.9" + "source": "https://github.com/utopia-php/platform/tree/0.7.8" }, - "time": "2025-06-24T20:21:05+00:00" + "time": "2025-05-30T10:05:43+00:00" }, { "name": "utopia-php/pools", @@ -4266,21 +4254,21 @@ }, { "name": "utopia-php/queue", - "version": "0.12.0", + "version": "0.11.0", "source": { "type": "git", "url": "https://github.com/utopia-php/queue.git", - "reference": "3a7603ee712c592bfc54af4a76f0426c428b5574" + "reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/queue/zipball/3a7603ee712c592bfc54af4a76f0426c428b5574", - "reference": "3a7603ee712c592bfc54af4a76f0426c428b5574", + "url": "https://api.github.com/repos/utopia-php/queue/zipball/06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5", + "reference": "06b5ced0eaed2ecc6aab6d8e1b4d96bff37a1ce5", "shasum": "" }, "require": { - "appwrite-labs/php-amqplib": "^0.1", "php": ">=8.3", + "php-amqplib/php-amqplib": "^3.7", "utopia-php/cli": "0.15.*", "utopia-php/fetch": "0.4.*", "utopia-php/framework": "0.33.*", @@ -4326,9 +4314,9 @@ ], "support": { "issues": "https://github.com/utopia-php/queue/issues", - "source": "https://github.com/utopia-php/queue/tree/0.12.0" + "source": "https://github.com/utopia-php/queue/tree/0.11.0" }, - "time": "2025-06-24T18:58:38+00:00" + "time": "2025-05-30T09:52:38+00:00" }, { "name": "utopia-php/registry", @@ -7267,16 +7255,16 @@ }, { "name": "symfony/console", - "version": "v7.3.1", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", "shasum": "" }, "require": { @@ -7341,7 +7329,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.1" + "source": "https://github.com/symfony/console/tree/v7.3.0" }, "funding": [ { @@ -7357,7 +7345,7 @@ "type": "tidelift" } ], - "time": "2025-06-27T19:55:54+00:00" + "time": "2025-05-24T10:34:04+00:00" }, { "name": "symfony/filesystem", diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index 347642e5a1..3c7915bc96 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -226,7 +226,7 @@ class Mapper ]; if (!$rule['required']) { - $fields[$escapedKey]['defaultValue'] = $rule['default'] ?? null; + $fields[$escapedKey]['defaultValue'] = $rule['default']; } } From 1cd69e26f884bbf532fc32a329880e90a18cc143 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 1 Jul 2025 18:24:52 -0400 Subject: [PATCH 14/26] =?UTF-8?q?Reapply=20"chore:=20update=20composer.jso?= =?UTF-8?q?n=20and=20composer.lock=20to=20include=20appwrite-lab=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 99ccd64b4c9418c51e172857974b441b47cb4982. --- app/controllers/api/users.php | 2 ++ src/Appwrite/GraphQL/Types/Mapper.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index d7def69464..b3ae17dc91 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -649,6 +649,8 @@ App::get('/v1/users') $total = $dbForProject->count('users', $filterQueries, APP_LIMIT_COUNT); } catch (OrderException $e) { throw new Exception(Exception::DATABASE_QUERY_ORDER_NULL, "The order attribute '{$e->getAttribute()}' had a null value. Cursor pagination requires all documents order attribute values are non-null."); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); } $response->dynamic(new Document([ 'users' => $users, diff --git a/src/Appwrite/GraphQL/Types/Mapper.php b/src/Appwrite/GraphQL/Types/Mapper.php index 3c7915bc96..347642e5a1 100644 --- a/src/Appwrite/GraphQL/Types/Mapper.php +++ b/src/Appwrite/GraphQL/Types/Mapper.php @@ -226,7 +226,7 @@ class Mapper ]; if (!$rule['required']) { - $fields[$escapedKey]['defaultValue'] = $rule['default']; + $fields[$escapedKey]['defaultValue'] = $rule['default'] ?? null; } } From aa9a82d8ce3b5c2c9509f620069879d0bc7416b3 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 14:32:16 +0530 Subject: [PATCH 15/26] fix: document attribute type. --- app/controllers/api/migrations.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 92fca88744..6fae5204b2 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -410,8 +410,8 @@ App::post('/v1/migrations/csv') 'resources' => $resources, 'resourceId' => $resourceId, 'resourceType' => Resource::TYPE_DATABASE, - 'statusCounters' => [], - 'resourceData' => [], + 'statusCounters' => '{}', + 'resourceData' => '{}', 'errors' => [], 'options' => [ 'path' => $newPath, From eb1d4c68ea5f10b582fb84e7669796cb507c9994 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 14:54:25 +0530 Subject: [PATCH 16/26] add: logging. --- src/Appwrite/Platform/Workers/Migrations.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 573772835e..9c5f9b6f79 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -154,6 +154,8 @@ class Migrations extends Action $this->sourceReport = $migrationSource->report(); + Console::log(json_encode(['stage' => 'processSource', 'source' => $source], JSON_PRETTY_PRINT)); + return $migrationSource; } @@ -164,6 +166,8 @@ class Migrations extends Action { $destination = $migration->getAttribute('destination'); + Console::log(json_encode(['stage' => 'processDestination', 'destination' => $destination], JSON_PRETTY_PRINT)); + return match ($destination) { DestinationAppwrite::getName() => new DestinationAppwrite( $this->project->getId(), @@ -214,6 +218,12 @@ class Migrations extends Action ->setPayload($clonedMigrationDocument->getArrayCopy(), ['options', 'credentials']) ->trigger(); + Console::log(json_encode([ + 'stage' => 'updateMigrationDocument', + 'migration' => $migration, + 'clonedMigration' => $clonedMigrationDocument + ], JSON_PRETTY_PRINT)); + return $this->dbForProject->updateDocument('migrations', $migration->getId(), $migration); } @@ -306,6 +316,15 @@ class Migrations extends Action $transfer->run( $migration->getAttribute('resources'), function () use ($migration, $transfer, $projectDocument, $queueForRealtime) { + Console::log(json_encode([ + 'stage' => 'transfer#run', + 'migration' => $migration, + 'details' => [ + 'resourceData' => $transfer->getCache(), + 'statusCounters' => $transfer->getStatusCounters() + ] + ], JSON_PRETTY_PRINT)); + $migration->setAttribute('resourceData', json_encode($transfer->getCache())); $migration->setAttribute('statusCounters', json_encode($transfer->getStatusCounters())); $this->updateMigrationDocument($migration, $projectDocument, $queueForRealtime); From d34635becb6054b804c3e9617c9e30e5460716ce Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 15:13:42 +0530 Subject: [PATCH 17/26] add: logging for errors. --- src/Appwrite/Platform/Workers/Migrations.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 9c5f9b6f79..3cf43b5c1b 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -332,7 +332,13 @@ class Migrations extends Action $migration->getAttribute('resourceId'), $migration->getAttribute('resourceType') ); + } else { + Console::log(json_encode([ + 'stage' => 'source#errors', + 'errors' => $source->getErrors(), + ], JSON_PRETTY_PRINT)); } + $destination->shutDown(); $source->shutDown(); From 0e50fb7ec5ddc112c40075d69230c79ad7508094 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 17:04:26 +0530 Subject: [PATCH 18/26] add: migrations lib logging for errors. --- composer.json | 2 +- composer.lock | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 4c36ab125d..58cc03457b 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.10.*", + "utopia-php/migration": "logging-dev", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 05c8a49512..b78635d9af 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "55bc52686a08d64930e6af7411ac0654", + "content-hash": "63bb9b3d7f61273cd71bf98e44ecf83c", "packages": [ { "name": "adhocore/jwt", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.1", + "version": "dev-logging", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" + "reference": "c6eb35992bc09ccb7210a95519bc12f313c05d28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/c6eb35992bc09ccb7210a95519bc12f313c05d28", + "reference": "c6eb35992bc09ccb7210a95519bc12f313c05d28", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.1" + "source": "https://github.com/utopia-php/migration/tree/logging" }, - "time": "2025-05-26T15:29:19+00:00" + "time": "2025-07-02T11:33:13+00:00" }, { "name": "utopia-php/orchestration", @@ -8236,7 +8236,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/migration": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From fc1a9a4e16dba695a430f989692fdeff34a174f4 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 19:13:13 +0530 Subject: [PATCH 19/26] fix: path and revert deps. --- app/controllers/api/migrations.php | 2 +- composer.json | 2 +- composer.lock | 70 ++++++++++---------- src/Appwrite/Platform/Workers/Migrations.php | 24 ------- 4 files changed, 36 insertions(+), 62 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 6fae5204b2..85751811ba 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -361,7 +361,7 @@ App::post('/v1/migrations/csv') $hasCompression = $compression !== Compression::NONE; $migrationId = ID::unique(); - $newPath = $deviceForImports->getPath('/' . $migrationId . '_' . $fileId . '.csv'); + $newPath = $deviceForImports->getPath($migrationId . '_' . $fileId . '.csv'); if ($hasEncryption || $hasCompression) { $source = $deviceForFiles->read($path); diff --git a/composer.json b/composer.json index 58cc03457b..4c36ab125d 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "logging-dev", + "utopia-php/migration": "0.10.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index b78635d9af..b809b01124 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "63bb9b3d7f61273cd71bf98e44ecf83c", + "content-hash": "55bc52686a08d64930e6af7411ac0654", "packages": [ { "name": "adhocore/jwt", @@ -1878,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.45", + "version": "3.0.46", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", "shasum": "" }, "require": { @@ -1968,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" }, "funding": [ { @@ -1984,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-22T22:54:43+00:00" + "time": "2025-06-26T16:29:55+00:00" }, { "name": "psr/container", @@ -2547,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9" + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/57e4fb86314015a695a750ace358d07a7e37b8a9", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9", + "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", "shasum": "" }, "require": { @@ -2568,6 +2568,7 @@ }, "conflict": { "amphp/amp": "<2.5", + "amphp/socket": "<1.1", "php-http/discovery": "<1.15", "symfony/http-foundation": "<6.4" }, @@ -2580,7 +2581,6 @@ "require-dev": { "amphp/http-client": "^4.2.1|^5.0", "amphp/http-tunnel": "^1.0|^2.0", - "amphp/socket": "^1.1", "guzzlehttp/promises": "^1.4|^2.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", @@ -2622,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.0" + "source": "https://github.com/symfony/http-client/tree/v7.3.1" }, "funding": [ { @@ -2638,7 +2638,7 @@ "type": "tidelift" } ], - "time": "2025-05-02T08:23:16+00:00" + "time": "2025-06-28T07:58:39+00:00" }, { "name": "symfony/http-client-contracts", @@ -2960,16 +2960,16 @@ }, { "name": "tbachert/spi", - "version": "v1.0.3", + "version": "v1.0.5", "source": { "type": "git", "url": "https://github.com/Nevay/spi.git", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a" + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nevay/spi/zipball/506a79c98e1a51522e76ee921ccb6c62d52faf3a", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a", + "url": "https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002", + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002", "shasum": "" }, "require": { @@ -2987,7 +2987,7 @@ "extra": { "class": "Nevay\\SPI\\Composer\\Plugin", "branch-alias": { - "dev-main": "0.2.x-dev" + "dev-main": "1.0.x-dev" }, "plugin-optional": true }, @@ -3006,9 +3006,9 @@ ], "support": { "issues": "https://github.com/Nevay/spi/issues", - "source": "https://github.com/Nevay/spi/tree/v1.0.3" + "source": "https://github.com/Nevay/spi/tree/v1.0.5" }, - "time": "2025-04-02T19:38:14+00:00" + "time": "2025-06-29T15:42:06+00:00" }, { "name": "thecodingmachine/safe", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "dev-logging", + "version": "0.10.1", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "c6eb35992bc09ccb7210a95519bc12f313c05d28" + "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/c6eb35992bc09ccb7210a95519bc12f313c05d28", - "reference": "c6eb35992bc09ccb7210a95519bc12f313c05d28", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", + "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/logging" + "source": "https://github.com/utopia-php/migration/tree/0.10.1" }, - "time": "2025-07-02T11:33:13+00:00" + "time": "2025-05-26T15:29:19+00:00" }, { "name": "utopia-php/orchestration", @@ -7255,16 +7255,16 @@ }, { "name": "symfony/console", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", + "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", "shasum": "" }, "require": { @@ -7329,7 +7329,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.0" + "source": "https://github.com/symfony/console/tree/v7.3.1" }, "funding": [ { @@ -7345,7 +7345,7 @@ "type": "tidelift" } ], - "time": "2025-05-24T10:34:04+00:00" + "time": "2025-06-27T19:55:54+00:00" }, { "name": "symfony/filesystem", @@ -8236,9 +8236,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/migration": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 3cf43b5c1b..807cf5ec9d 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -154,8 +154,6 @@ class Migrations extends Action $this->sourceReport = $migrationSource->report(); - Console::log(json_encode(['stage' => 'processSource', 'source' => $source], JSON_PRETTY_PRINT)); - return $migrationSource; } @@ -166,8 +164,6 @@ class Migrations extends Action { $destination = $migration->getAttribute('destination'); - Console::log(json_encode(['stage' => 'processDestination', 'destination' => $destination], JSON_PRETTY_PRINT)); - return match ($destination) { DestinationAppwrite::getName() => new DestinationAppwrite( $this->project->getId(), @@ -218,12 +214,6 @@ class Migrations extends Action ->setPayload($clonedMigrationDocument->getArrayCopy(), ['options', 'credentials']) ->trigger(); - Console::log(json_encode([ - 'stage' => 'updateMigrationDocument', - 'migration' => $migration, - 'clonedMigration' => $clonedMigrationDocument - ], JSON_PRETTY_PRINT)); - return $this->dbForProject->updateDocument('migrations', $migration->getId(), $migration); } @@ -316,15 +306,6 @@ class Migrations extends Action $transfer->run( $migration->getAttribute('resources'), function () use ($migration, $transfer, $projectDocument, $queueForRealtime) { - Console::log(json_encode([ - 'stage' => 'transfer#run', - 'migration' => $migration, - 'details' => [ - 'resourceData' => $transfer->getCache(), - 'statusCounters' => $transfer->getStatusCounters() - ] - ], JSON_PRETTY_PRINT)); - $migration->setAttribute('resourceData', json_encode($transfer->getCache())); $migration->setAttribute('statusCounters', json_encode($transfer->getStatusCounters())); $this->updateMigrationDocument($migration, $projectDocument, $queueForRealtime); @@ -332,11 +313,6 @@ class Migrations extends Action $migration->getAttribute('resourceId'), $migration->getAttribute('resourceType') ); - } else { - Console::log(json_encode([ - 'stage' => 'source#errors', - 'errors' => $source->getErrors(), - ], JSON_PRETTY_PRINT)); } $destination->shutDown(); From 6d792fcb6ce28acbd3be2105355272c32e5e087b Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 19:20:30 +0530 Subject: [PATCH 20/26] revert: lock. --- composer.lock | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/composer.lock b/composer.lock index b809b01124..05c8a49512 100644 --- a/composer.lock +++ b/composer.lock @@ -1878,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.46", + "version": "3.0.45", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", - "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", + "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", "shasum": "" }, "require": { @@ -1968,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" }, "funding": [ { @@ -1984,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-26T16:29:55+00:00" + "time": "2025-06-22T22:54:43+00:00" }, { "name": "psr/container", @@ -2547,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.1", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" + "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", - "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", + "url": "https://api.github.com/repos/symfony/http-client/zipball/57e4fb86314015a695a750ace358d07a7e37b8a9", + "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9", "shasum": "" }, "require": { @@ -2568,7 +2568,6 @@ }, "conflict": { "amphp/amp": "<2.5", - "amphp/socket": "<1.1", "php-http/discovery": "<1.15", "symfony/http-foundation": "<6.4" }, @@ -2581,6 +2580,7 @@ "require-dev": { "amphp/http-client": "^4.2.1|^5.0", "amphp/http-tunnel": "^1.0|^2.0", + "amphp/socket": "^1.1", "guzzlehttp/promises": "^1.4|^2.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", @@ -2622,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.1" + "source": "https://github.com/symfony/http-client/tree/v7.3.0" }, "funding": [ { @@ -2638,7 +2638,7 @@ "type": "tidelift" } ], - "time": "2025-06-28T07:58:39+00:00" + "time": "2025-05-02T08:23:16+00:00" }, { "name": "symfony/http-client-contracts", @@ -2960,16 +2960,16 @@ }, { "name": "tbachert/spi", - "version": "v1.0.5", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/Nevay/spi.git", - "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002" + "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002", - "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002", + "url": "https://api.github.com/repos/Nevay/spi/zipball/506a79c98e1a51522e76ee921ccb6c62d52faf3a", + "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a", "shasum": "" }, "require": { @@ -2987,7 +2987,7 @@ "extra": { "class": "Nevay\\SPI\\Composer\\Plugin", "branch-alias": { - "dev-main": "1.0.x-dev" + "dev-main": "0.2.x-dev" }, "plugin-optional": true }, @@ -3006,9 +3006,9 @@ ], "support": { "issues": "https://github.com/Nevay/spi/issues", - "source": "https://github.com/Nevay/spi/tree/v1.0.5" + "source": "https://github.com/Nevay/spi/tree/v1.0.3" }, - "time": "2025-06-29T15:42:06+00:00" + "time": "2025-04-02T19:38:14+00:00" }, { "name": "thecodingmachine/safe", @@ -7255,16 +7255,16 @@ }, { "name": "symfony/console", - "version": "v7.3.1", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", - "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", "shasum": "" }, "require": { @@ -7329,7 +7329,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.1" + "source": "https://github.com/symfony/console/tree/v7.3.0" }, "funding": [ { @@ -7345,7 +7345,7 @@ "type": "tidelift" } ], - "time": "2025-06-27T19:55:54+00:00" + "time": "2025-05-24T10:34:04+00:00" }, { "name": "symfony/filesystem", From 6f5d3d53c081f730fa651fc56b54d1ee37730438 Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 19:51:36 +0530 Subject: [PATCH 21/26] bump: for tests. --- composer.json | 2 +- composer.lock | 70 ++++++++++++++++++++++++++------------------------- 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/composer.json b/composer.json index 4c36ab125d..9598bc3ebe 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "0.10.*", + "utopia-php/migration": "fix-path-dev", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index 05c8a49512..b5128bff85 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "55bc52686a08d64930e6af7411ac0654", + "content-hash": "0adf677d7a79dd195419f512265b9905", "packages": [ { "name": "adhocore/jwt", @@ -1878,16 +1878,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.45", + "version": "3.0.46", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8" + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/bd81b90d5963c6b9d87de50357585375223f4dd8", - "reference": "bd81b90d5963c6b9d87de50357585375223f4dd8", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", + "reference": "56483a7de62a6c2a6635e42e93b8a9e25d4f0ec6", "shasum": "" }, "require": { @@ -1968,7 +1968,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.45" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.46" }, "funding": [ { @@ -1984,7 +1984,7 @@ "type": "tidelift" } ], - "time": "2025-06-22T22:54:43+00:00" + "time": "2025-06-26T16:29:55+00:00" }, { "name": "psr/container", @@ -2547,16 +2547,16 @@ }, { "name": "symfony/http-client", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9" + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/57e4fb86314015a695a750ace358d07a7e37b8a9", - "reference": "57e4fb86314015a695a750ace358d07a7e37b8a9", + "url": "https://api.github.com/repos/symfony/http-client/zipball/4403d87a2c16f33345dca93407a8714ee8c05a64", + "reference": "4403d87a2c16f33345dca93407a8714ee8c05a64", "shasum": "" }, "require": { @@ -2568,6 +2568,7 @@ }, "conflict": { "amphp/amp": "<2.5", + "amphp/socket": "<1.1", "php-http/discovery": "<1.15", "symfony/http-foundation": "<6.4" }, @@ -2580,7 +2581,6 @@ "require-dev": { "amphp/http-client": "^4.2.1|^5.0", "amphp/http-tunnel": "^1.0|^2.0", - "amphp/socket": "^1.1", "guzzlehttp/promises": "^1.4|^2.0", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", @@ -2622,7 +2622,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v7.3.0" + "source": "https://github.com/symfony/http-client/tree/v7.3.1" }, "funding": [ { @@ -2638,7 +2638,7 @@ "type": "tidelift" } ], - "time": "2025-05-02T08:23:16+00:00" + "time": "2025-06-28T07:58:39+00:00" }, { "name": "symfony/http-client-contracts", @@ -2960,16 +2960,16 @@ }, { "name": "tbachert/spi", - "version": "v1.0.3", + "version": "v1.0.5", "source": { "type": "git", "url": "https://github.com/Nevay/spi.git", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a" + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nevay/spi/zipball/506a79c98e1a51522e76ee921ccb6c62d52faf3a", - "reference": "506a79c98e1a51522e76ee921ccb6c62d52faf3a", + "url": "https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002", + "reference": "e7078767866d0a9e0f91d3f9d42a832df5e39002", "shasum": "" }, "require": { @@ -2987,7 +2987,7 @@ "extra": { "class": "Nevay\\SPI\\Composer\\Plugin", "branch-alias": { - "dev-main": "0.2.x-dev" + "dev-main": "1.0.x-dev" }, "plugin-optional": true }, @@ -3006,9 +3006,9 @@ ], "support": { "issues": "https://github.com/Nevay/spi/issues", - "source": "https://github.com/Nevay/spi/tree/v1.0.3" + "source": "https://github.com/Nevay/spi/tree/v1.0.5" }, - "time": "2025-04-02T19:38:14+00:00" + "time": "2025-06-29T15:42:06+00:00" }, { "name": "thecodingmachine/safe", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.1", + "version": "dev-fix-path", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" + "reference": "1f2271ec2be7daba00ce025dbbb25a988caf4796" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/1f2271ec2be7daba00ce025dbbb25a988caf4796", + "reference": "1f2271ec2be7daba00ce025dbbb25a988caf4796", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.1" + "source": "https://github.com/utopia-php/migration/tree/fix-path" }, - "time": "2025-05-26T15:29:19+00:00" + "time": "2025-07-02T14:18:24+00:00" }, { "name": "utopia-php/orchestration", @@ -7255,16 +7255,16 @@ }, { "name": "symfony/console", - "version": "v7.3.0", + "version": "v7.3.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", - "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", + "url": "https://api.github.com/repos/symfony/console/zipball/9e27aecde8f506ba0fd1d9989620c04a87697101", + "reference": "9e27aecde8f506ba0fd1d9989620c04a87697101", "shasum": "" }, "require": { @@ -7329,7 +7329,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.0" + "source": "https://github.com/symfony/console/tree/v7.3.1" }, "funding": [ { @@ -7345,7 +7345,7 @@ "type": "tidelift" } ], - "time": "2025-05-24T10:34:04+00:00" + "time": "2025-06-27T19:55:54+00:00" }, { "name": "symfony/filesystem", @@ -8236,7 +8236,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "utopia-php/migration": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From ed2d12f8966309b3dfa29e4a5b7874abcf04dafb Mon Sep 17 00:00:00 2001 From: Darshan Date: Wed, 2 Jul 2025 19:55:42 +0530 Subject: [PATCH 22/26] update: full path on appwrite. --- app/controllers/api/migrations.php | 7 +++++++ composer.json | 2 +- composer.lock | 18 ++++++++---------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 85751811ba..f292a90a77 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -401,6 +401,13 @@ App::post('/v1/migrations/csv') $fileSize = $deviceForImports->getFileSize($newPath); $resources = Transfer::extractServices([Transfer::GROUP_DATABASES]); + // full path + $newPath = str_ireplace( + $deviceForImports->getRoot(), + $deviceForImports->getRoot() . DIRECTORY_SEPARATOR, + $newPath + ); + $migration = $dbForProject->createDocument('migrations', new Document([ '$id' => $migrationId, 'status' => 'pending', diff --git a/composer.json b/composer.json index 9598bc3ebe..4c36ab125d 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", "utopia-php/messaging": "0.18.*", - "utopia-php/migration": "fix-path-dev", + "utopia-php/migration": "0.10.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", "utopia-php/pools": "0.8.*", diff --git a/composer.lock b/composer.lock index b5128bff85..b809b01124 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0adf677d7a79dd195419f512265b9905", + "content-hash": "55bc52686a08d64930e6af7411ac0654", "packages": [ { "name": "adhocore/jwt", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "dev-fix-path", + "version": "0.10.1", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "1f2271ec2be7daba00ce025dbbb25a988caf4796" + "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/1f2271ec2be7daba00ce025dbbb25a988caf4796", - "reference": "1f2271ec2be7daba00ce025dbbb25a988caf4796", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", + "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/fix-path" + "source": "https://github.com/utopia-php/migration/tree/0.10.1" }, - "time": "2025-07-02T14:18:24+00:00" + "time": "2025-05-26T15:29:19+00:00" }, { "name": "utopia-php/orchestration", @@ -8236,9 +8236,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/migration": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { From b1724e9c9ddac72c666a548039acc267d0aea164 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 2 Jul 2025 10:40:35 -0400 Subject: [PATCH 23/26] Update lock --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index b809b01124..0e61f2cd4b 100644 --- a/composer.lock +++ b/composer.lock @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.1", + "version": "0.10.2", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f" + "reference": "42da0d3f00bb8a3eb480294ca94b5402e6a5a35c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/ea1c585df7ec5f346f061a11581fc9a91679966f", - "reference": "ea1c585df7ec5f346f061a11581fc9a91679966f", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/42da0d3f00bb8a3eb480294ca94b5402e6a5a35c", + "reference": "42da0d3f00bb8a3eb480294ca94b5402e6a5a35c", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.1" + "source": "https://github.com/utopia-php/migration/tree/0.10.2" }, - "time": "2025-05-26T15:29:19+00:00" + "time": "2025-07-02T14:37:14+00:00" }, { "name": "utopia-php/orchestration", From ce8ae2294a0ef6ccd9a4aea9cdf633b8560094cf Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 2 Jul 2025 12:58:37 -0400 Subject: [PATCH 24/26] Update lock --- composer.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 0e61f2cd4b..abea16be08 100644 --- a/composer.lock +++ b/composer.lock @@ -3493,16 +3493,16 @@ }, { "name": "utopia-php/database", - "version": "0.71.8", + "version": "0.71.9", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "7dff6b67a54f1a7f9d3f210db4c6e40d7052b79e" + "reference": "eb2f759020bba617e99dd67973a9bd949b47f54e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/7dff6b67a54f1a7f9d3f210db4c6e40d7052b79e", - "reference": "7dff6b67a54f1a7f9d3f210db4c6e40d7052b79e", + "url": "https://api.github.com/repos/utopia-php/database/zipball/eb2f759020bba617e99dd67973a9bd949b47f54e", + "reference": "eb2f759020bba617e99dd67973a9bd949b47f54e", "shasum": "" }, "require": { @@ -3543,9 +3543,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.71.8" + "source": "https://github.com/utopia-php/database/tree/0.71.9" }, - "time": "2025-06-26T14:48:17+00:00" + "time": "2025-07-02T16:37:41+00:00" }, { "name": "utopia-php/detector", @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.2", + "version": "0.10.3", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "42da0d3f00bb8a3eb480294ca94b5402e6a5a35c" + "reference": "c8509727d0c5ecef31c1063b5901ed1a7541c71e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/42da0d3f00bb8a3eb480294ca94b5402e6a5a35c", - "reference": "42da0d3f00bb8a3eb480294ca94b5402e6a5a35c", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/c8509727d0c5ecef31c1063b5901ed1a7541c71e", + "reference": "c8509727d0c5ecef31c1063b5901ed1a7541c71e", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.2" + "source": "https://github.com/utopia-php/migration/tree/0.10.3" }, - "time": "2025-07-02T14:37:14+00:00" + "time": "2025-07-02T16:57:46+00:00" }, { "name": "utopia-php/orchestration", From 2ce3118ba96bd54df4be354f89eadcbb93b5d397 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 2 Jul 2025 13:36:46 -0400 Subject: [PATCH 25/26] Remove path update --- app/controllers/api/migrations.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index f292a90a77..85751811ba 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -401,13 +401,6 @@ App::post('/v1/migrations/csv') $fileSize = $deviceForImports->getFileSize($newPath); $resources = Transfer::extractServices([Transfer::GROUP_DATABASES]); - // full path - $newPath = str_ireplace( - $deviceForImports->getRoot(), - $deviceForImports->getRoot() . DIRECTORY_SEPARATOR, - $newPath - ); - $migration = $dbForProject->createDocument('migrations', new Document([ '$id' => $migrationId, 'status' => 'pending', From 55dc965dd6e1a55e925b4a698fb8fe285805b7b3 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 2 Jul 2025 14:32:05 -0400 Subject: [PATCH 26/26] Update lib --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index abea16be08..01a3ce7401 100644 --- a/composer.lock +++ b/composer.lock @@ -3993,16 +3993,16 @@ }, { "name": "utopia-php/migration", - "version": "0.10.3", + "version": "0.10.4", "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "c8509727d0c5ecef31c1063b5901ed1a7541c71e" + "reference": "0c85917482db172b3ccdc0704e42af3c1cc89361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/c8509727d0c5ecef31c1063b5901ed1a7541c71e", - "reference": "c8509727d0c5ecef31c1063b5901ed1a7541c71e", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/0c85917482db172b3ccdc0704e42af3c1cc89361", + "reference": "0c85917482db172b3ccdc0704e42af3c1cc89361", "shasum": "" }, "require": { @@ -4043,9 +4043,9 @@ ], "support": { "issues": "https://github.com/utopia-php/migration/issues", - "source": "https://github.com/utopia-php/migration/tree/0.10.3" + "source": "https://github.com/utopia-php/migration/tree/0.10.4" }, - "time": "2025-07-02T16:57:46+00:00" + "time": "2025-07-02T18:31:09+00:00" }, { "name": "utopia-php/orchestration",