From af3f7c57a2c04534ed7dd76774a393bb660ae5ea Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Mon, 22 Jun 2026 12:01:18 +0530 Subject: [PATCH 01/13] feat: allow sorting by accessedAt for users and projects --- src/Appwrite/Utopia/Database/Validator/Queries/Projects.php | 3 ++- src/Appwrite/Utopia/Database/Validator/Queries/Users.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php b/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php index 50c9d850f3..95720a5823 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Projects.php @@ -8,7 +8,8 @@ class Projects extends Base 'name', 'teamId', 'labels', - 'search' + 'search', + 'accessedAt', ]; /** diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Users.php b/src/Appwrite/Utopia/Database/Validator/Queries/Users.php index 4fdae0e93c..e38cd6c397 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Users.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Users.php @@ -15,6 +15,7 @@ class Users extends Base 'phoneVerification', 'labels', 'impersonator', + 'accessedAt', ]; /** From 95a639b53a4f78d39a2300edab4e8ab38f3c2516 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Mon, 22 Jun 2026 12:29:02 +0530 Subject: [PATCH 02/13] fix: add standalone accessedAt index to projects collection --- app/config/collections/platform.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/config/collections/platform.php b/app/config/collections/platform.php index f93d82456e..9a493058f2 100644 --- a/app/config/collections/platform.php +++ b/app/config/collections/platform.php @@ -415,6 +415,13 @@ $platformCollections = [ 'lengths' => [], 'orders' => [], ], + [ + '$id' => ID::custom('_key_accessedAt'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['accessedAt'], + 'lengths' => [], + 'orders' => [], + ], [ '$id' => ID::custom('_key_teamInternalId'), 'type' => Database::INDEX_KEY, From f9a1cfd9ba4999f8722599443ea0b607eadcd182 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Wed, 1 Jul 2026 12:58:36 +0530 Subject: [PATCH 03/13] test: add tests for sorting users and projects by accessedAt --- .../Projects/ProjectsConsoleClientTest.php | 29 ++++++++++++++++++ tests/e2e/Services/Users/UsersBase.php | 30 +++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 696fce63cc..40177e3a6f 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -14,6 +14,7 @@ use Tests\E2E\Scopes\SideClient; use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; +use Utopia\Database\Query; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; @@ -1531,6 +1532,34 @@ final class ProjectsConsoleClientTest extends Scope ], $this->getHeaders())); $this->assertEquals(404, $response['headers']['status-code']); + + /** + * Test for SUCCESS orderDesc by accessedAt + */ + $response = $this->client->call(Client::METHOD_GET, '/projects', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderDesc('accessedAt')->toString() + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + /** + * Test for SUCCESS orderAsc by accessedAt + */ + $response = $this->client->call(Client::METHOD_GET, '/projects', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderAsc('accessedAt')->toString() + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); } public function testGetProjectUsage(): void diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index eeadbfa925..aac4c0d33c 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -1156,6 +1156,36 @@ trait UsersBase $this->assertEquals($user['body']['code'], 404); $this->assertEquals($user['body']['message'], 'User with the requested ID could not be found.'); $this->assertEquals($user['body']['type'], 'user_not_found'); + + /** + * Test for SUCCESS orderDesc by accessedAt + */ + $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderDesc('accessedAt')->toString() + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertNotEmpty($response['body']['users']); + + /** + * Test for SUCCESS orderAsc by accessedAt + */ + $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::orderAsc('accessedAt')->toString() + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertNotEmpty($response['body']['users']); } public function testListUserMemberships(): void From 930d1638a748e841af5e160a32f58bfad6f5bdd5 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 1 Jul 2026 14:50:32 +0530 Subject: [PATCH 04/13] ci: run independent workflow steps in parallel --- .github/workflows/ci.yml | 293 ++++++++++++++++-------------- .github/workflows/sdk-preview.yml | 17 +- 2 files changed, 167 insertions(+), 143 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e52f108de6..372ddfb2d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,44 +119,46 @@ jobs: id: install run: composer install --prefer-dist --no-progress --ignore-platform-reqs - - name: Install Node dependencies - if: ${{ !cancelled() && steps.install.outcome == 'success' }} - run: npm ci + - parallel: + - name: Install Node dependencies + if: ${{ !cancelled() && steps.install.outcome == 'success' }} + run: npm ci - - name: Cache PHPStan result cache - if: ${{ !cancelled() && steps.install.outcome == 'success' }} - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 - with: - path: .phpstan-cache - key: phpstan-${{ github.sha }} - restore-keys: | - phpstan- + - name: Cache PHPStan result cache + if: ${{ !cancelled() && steps.install.outcome == 'success' }} + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: .phpstan-cache + key: phpstan-${{ github.sha }} + restore-keys: | + phpstan- - - name: Audit dependencies - if: ${{ !cancelled() && steps.install.outcome == 'success' }} - env: - COMPOSER_NO_AUDIT: 0 - run: composer audit + - parallel: + - name: Audit dependencies + if: ${{ !cancelled() && steps.install.outcome == 'success' }} + env: + COMPOSER_NO_AUDIT: 0 + run: composer audit - - name: Run Linter - if: ${{ !cancelled() && steps.install.outcome == 'success' }} - run: composer lint + - name: Run Linter + if: ${{ !cancelled() && steps.install.outcome == 'success' }} + run: composer lint - - name: Check Docker Compose formatting - if: ${{ !cancelled() && steps.install.outcome == 'success' }} - run: npm run lint:compose + - name: Check Docker Compose formatting + if: ${{ !cancelled() && steps.install.outcome == 'success' }} + run: npm run lint:compose - - name: Run Rector - if: ${{ !cancelled() && steps.install.outcome == 'success' }} - run: composer refactor:check + - name: Run Rector + if: ${{ !cancelled() && steps.install.outcome == 'success' }} + run: composer refactor:check - - name: Run PHPStan - if: ${{ !cancelled() && steps.install.outcome == 'success' }} - run: composer analyze -- --no-progress + - name: Run PHPStan + if: ${{ !cancelled() && steps.install.outcome == 'success' }} + run: composer analyze -- --no-progress - - name: Generate specs - if: ${{ !cancelled() && steps.install.outcome == 'success' }} - run: _APP_STORAGE_LIMIT=5368709120 php app/cli.php specs --version=latest --git=no + - name: Generate specs + if: ${{ !cancelled() && steps.install.outcome == 'success' }} + run: _APP_STORAGE_LIMIT=5368709120 php app/cli.php specs --version=latest --git=no locale: name: Checks / Locale @@ -298,28 +300,32 @@ jobs: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Pull Docker Image - run: | - docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} - docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + - parallel: + - name: Pull Docker Image + run: | + docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} + docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + + - name: Pull Docker Compose images + timeout-minutes: 5 + run: | + # Docker Hub registry timeouts are a common transient CI failure + # (e.g. a traefik manifest fetch timing out). Retry the image pull; + # keep `up` single-shot so genuine container health failures still surface. + for attempt in 1 2 3; do + if docker compose pull --quiet --ignore-buildable; then + break + elif [ "$attempt" -eq 3 ]; then + echo "::error::docker compose pull failed after 3 attempts; aborting" + exit 1 + fi + echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" + sleep 15 + done - name: Load and Start Appwrite timeout-minutes: 5 - run: | - # Docker Hub registry timeouts are a common transient CI failure - # (e.g. a traefik manifest fetch timing out). Retry the image pull; - # keep `up` single-shot so genuine container health failures still surface. - for attempt in 1 2 3; do - if docker compose pull --quiet --ignore-buildable; then - break - elif [ "$attempt" -eq 3 ]; then - echo "::error::docker compose pull failed after 3 attempts; aborting" - exit 1 - fi - echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" - sleep 15 - done - docker compose up -d --quiet-pull --wait + run: docker compose up -d --quiet-pull --wait - name: Environment Variables run: docker compose exec -T appwrite vars @@ -357,28 +363,32 @@ jobs: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Pull Docker Image - run: | - docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} - docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + - parallel: + - name: Pull Docker Image + run: | + docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} + docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + + - name: Pull Docker Compose images + timeout-minutes: 5 + run: | + # Docker Hub registry timeouts are a common transient CI failure + # (e.g. a traefik manifest fetch timing out). Retry the image pull; + # keep `up` single-shot so genuine container health failures still surface. + for attempt in 1 2 3; do + if docker compose pull --quiet --ignore-buildable; then + break + elif [ "$attempt" -eq 3 ]; then + echo "::error::docker compose pull failed after 3 attempts; aborting" + exit 1 + fi + echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" + sleep 15 + done - name: Load and Start Appwrite timeout-minutes: 5 - run: | - # Docker Hub registry timeouts are a common transient CI failure - # (e.g. a traefik manifest fetch timing out). Retry the image pull; - # keep `up` single-shot so genuine container health failures still surface. - for attempt in 1 2 3; do - if docker compose pull --quiet --ignore-buildable; then - break - elif [ "$attempt" -eq 3 ]; then - echo "::error::docker compose pull failed after 3 attempts; aborting" - exit 1 - fi - echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" - sleep 15 - done - docker compose up -d --quiet-pull --wait + run: docker compose up -d --quiet-pull --wait - name: Wait for Open Runtimes timeout-minutes: 3 @@ -454,10 +464,28 @@ jobs: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Pull Docker Image - run: | - docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} - docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + - parallel: + - name: Pull Docker Image + run: | + docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} + docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + + - name: Pull Docker Compose images + timeout-minutes: 5 + run: | + # Docker Hub registry timeouts are a common transient CI failure + # (e.g. a traefik manifest fetch timing out). Retry the image pull; + # keep `up` single-shot so genuine container health failures still surface. + for attempt in 1 2 3; do + if docker compose pull --quiet --ignore-buildable; then + break + elif [ "$attempt" -eq 3 ]; then + echo "::error::docker compose pull failed after 3 attempts; aborting" + exit 1 + fi + echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" + sleep 15 + done - name: Load and Start Appwrite timeout-minutes: 5 @@ -466,21 +494,7 @@ jobs: _APP_DATABASE_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'database_db_main' || '' }} _APP_DATABASE_DOCUMENTSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'documentsdb_db_main' || '' }} _APP_DATABASE_VECTORSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'vectorsdb_db_main' || '' }} - run: | - # Docker Hub registry timeouts are a common transient CI failure - # (e.g. a traefik manifest fetch timing out). Retry the image pull; - # keep `up` single-shot so genuine container health failures still surface. - for attempt in 1 2 3; do - if docker compose pull --quiet --ignore-buildable; then - break - elif [ "$attempt" -eq 3 ]; then - echo "::error::docker compose pull failed after 3 attempts; aborting" - exit 1 - fi - echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" - sleep 15 - done - docker compose up -d --quiet-pull --wait + run: docker compose up -d --quiet-pull --wait - name: Wait for Open Runtimes timeout-minutes: 3 @@ -549,10 +563,28 @@ jobs: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Pull Docker Image - run: | - docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} - docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + - parallel: + - name: Pull Docker Image + run: | + docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} + docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + + - name: Pull Docker Compose images + timeout-minutes: 5 + run: | + # Docker Hub registry timeouts are a common transient CI failure + # (e.g. a traefik manifest fetch timing out). Retry the image pull; + # keep `up` single-shot so genuine container health failures still surface. + for attempt in 1 2 3; do + if docker compose pull --quiet --ignore-buildable; then + break + elif [ "$attempt" -eq 3 ]; then + echo "::error::docker compose pull failed after 3 attempts; aborting" + exit 1 + fi + echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" + sleep 15 + done - name: Load and Start Appwrite timeout-minutes: 5 @@ -561,21 +593,7 @@ jobs: _APP_DATABASE_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'database_db_main' || '' }} _APP_DATABASE_DOCUMENTSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'documentsdb_db_main' || '' }} _APP_DATABASE_VECTORSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'vectorsdb_db_main' || '' }} - run: | - # Docker Hub registry timeouts are a common transient CI failure - # (e.g. a traefik manifest fetch timing out). Retry the image pull; - # keep `up` single-shot so genuine container health failures still surface. - for attempt in 1 2 3; do - if docker compose pull --quiet --ignore-buildable; then - break - elif [ "$attempt" -eq 3 ]; then - echo "::error::docker compose pull failed after 3 attempts; aborting" - exit 1 - fi - echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" - sleep 15 - done - docker compose up -d --quiet-pull --wait + run: docker compose up -d --quiet-pull --wait - name: Run tests timeout-minutes: 15 @@ -620,10 +638,28 @@ jobs: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Pull Docker Image - run: | - docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} - docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + - parallel: + - name: Pull Docker Image + run: | + docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} + docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + + - name: Pull Docker Compose images + timeout-minutes: 5 + run: | + # Docker Hub registry timeouts are a common transient CI failure + # (e.g. a traefik manifest fetch timing out). Retry the image pull; + # keep `up` single-shot so genuine container health failures still surface. + for attempt in 1 2 3; do + if docker compose pull --quiet --ignore-buildable; then + break + elif [ "$attempt" -eq 3 ]; then + echo "::error::docker compose pull failed after 3 attempts; aborting" + exit 1 + fi + echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" + sleep 15 + done - name: Load and Start Appwrite timeout-minutes: 5 @@ -631,21 +667,7 @@ jobs: _APP_DATABASE_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'database_db_main' || '' }} _APP_DATABASE_DOCUMENTSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'documentsdb_db_main' || '' }} _APP_DATABASE_VECTORSDB_SHARED_TABLES: ${{ matrix.mode != 'dedicated' && 'vectorsdb_db_main' || '' }} - run: | - # Docker Hub registry timeouts are a common transient CI failure - # (e.g. a traefik manifest fetch timing out). Retry the image pull; - # keep `up` single-shot so genuine container health failures still surface. - for attempt in 1 2 3; do - if docker compose pull --quiet --ignore-buildable; then - break - elif [ "$attempt" -eq 3 ]; then - echo "::error::docker compose pull failed after 3 attempts; aborting" - exit 1 - fi - echo "::warning::docker compose pull failed (attempt ${attempt}/3); retrying in 15s" - sleep 15 - done - docker compose up -d --quiet-pull --wait + run: docker compose up -d --quiet-pull --wait - name: Wait for Open Runtimes timeout-minutes: 3 @@ -699,16 +721,17 @@ jobs: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Pull Appwrite image - run: | - docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} - docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} - docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }}:after + - parallel: + - name: Pull Appwrite image + run: | + docker pull ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} + docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }} + docker tag ${{ env.RUNS_ON_ECR_CACHE }}:${{ env.IMAGE }}-${{ github.sha }} ${{ env.IMAGE }}:after - - name: Setup k6 - uses: grafana/setup-k6-action@db07bd9765aac508ef18982e52ab937fe633a065 # v1.2.1 - with: - k6-version: ${{ env.K6_VERSION }} + - name: Setup k6 + uses: grafana/setup-k6-action@db07bd9765aac508ef18982e52ab937fe633a065 # v1.2.1 + with: + k6-version: ${{ env.K6_VERSION }} - name: Prepare benchmark before id: benchmark_before_prepare diff --git a/.github/workflows/sdk-preview.yml b/.github/workflows/sdk-preview.yml index 535b3712f6..667598bfc0 100644 --- a/.github/workflows/sdk-preview.yml +++ b/.github/workflows/sdk-preview.yml @@ -35,10 +35,15 @@ jobs: fi echo "platform=$PLATFORM" >> $GITHUB_OUTPUT - - name: Load and Start Appwrite - run: | - docker compose build - docker compose up -d + - parallel: + - name: Load and Start Appwrite + run: | + docker compose build + docker compose up -d + + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: 20 - name: Generate Specs run: | @@ -48,10 +53,6 @@ jobs: run: | docker compose exec appwrite sdks --platform=${{ steps.set-sdk.outputs.platform }} --sdk=${{ steps.set-sdk.outputs.sdk_type }} --version=latest --git=no sudo chown -R $USER:$USER ./app/sdks/${{ steps.set-sdk.outputs.platform }}-${{ steps.set-sdk.outputs.sdk_type }} - - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: 20 - name: Build and Publish SDK working-directory: ./app/sdks/${{ steps.set-sdk.outputs.platform }}-${{ steps.set-sdk.outputs.sdk_type }} From 27376c93c36a29e683d557041b96b10a3b4e834f Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 1 Jul 2026 15:21:53 +0530 Subject: [PATCH 05/13] ci: name sdk preview node setup step --- .github/workflows/sdk-preview.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sdk-preview.yml b/.github/workflows/sdk-preview.yml index 667598bfc0..468e0f0b97 100644 --- a/.github/workflows/sdk-preview.yml +++ b/.github/workflows/sdk-preview.yml @@ -41,7 +41,8 @@ jobs: docker compose build docker compose up -d - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + - name: Setup Node + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 20 From 6355984a8da11fa3ccccd6e8fae113c6f10a36f7 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Wed, 1 Jul 2026 07:13:50 -0400 Subject: [PATCH 06/13] docs(AGENTS): add naming conventions and guidelines for code structure, HTTP API, and environment variables --- AGENTS.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 2a73d6d90e..53c03c7bca 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -117,6 +117,96 @@ Common injections: `$response`, `$request`, `$dbForProject`, `$dbForPlatform`, ` - Never hardcode credentials -- use environment variables. - Code changes may require container restart. No central log location -- check relevant containers. +## Naming conventions + +Follow PSR-12/PSR-4 defaults unless noted below. These principles apply everywhere -- code, paths, labels, tests, and configuration: + +1. **Minimum viable length.** A name should be as short as clarity allows and as long as clarity requires. Include only the words needed to identify the thing at its level of abstraction. +2. **Prefer single words.** Use one word when an existing term is unambiguous in context. Reserve compound or concatenated names for cases where no single word communicates the meaning without ambiguity. +3. **Do not repeat enclosing context.** Parent namespaces already establish scope -- HTTP path segments, directory layout, module name, class namespace, route prefix, or container/module registration. Local names must not restate that context. +4. **Prefer established terms.** When several names are equally clear, choose the one that matches conventions already used in the same module, service, or layer. Consistency across the codebase outweighs local preference. + +When in doubt, match the nearest existing module that follows these rules. Legacy code may not conform -- **do not copy outdated patterns by default**. If existing code in the area you are editing violates these principles, call it out in review or in your change description rather than extending the inconsistency. New code should follow this document; opportunistic clean-up of nearby naming is welcome when scope allows. + +**Examples** + +| Context already provides | Avoid | Prefer | +|--------------------------|-------|--------| +| `Modules/Teams/Http/Teams/` | `createTeam`, `listTeams` | `create`, `list` (via `getName()` / SDK `name`) | +| `Modules/Functions/Http/Deployments/` | `createFunctionDeployment` | `createDeployment` | +| `Modules/Project/Http/Project/Platforms/Android/` | `createProjectAndroidPlatform` | `create` | +| SDK label with `namespace: 'teams'` | `name: 'createTeam'` | `name: 'create'` | +| Handler injected with `$project` | `$projectDocument`, `$currentProject` | `$project` | + +Add qualifiers only when they disambiguate: `createStringColumn` (type-specific), `:deploymentId` (multiple IDs in one route), `publisherForBuilds` (several publishers in one handler). + +### PHP code + +| Kind | Style | Examples | +|------|-------|----------| +| Namespaces | PSR-4, mirrors `src/` path | `Appwrite\Platform\Modules\Teams\Http\Teams` | +| Classes | PascalCase | `Create`, `Functions`, `Variable` | +| Methods & variables | camelCase | `getName()`, `$teamId`, `$dbForProject` | +| Class constants | `SCREAMING_SNAKE_CASE` | `MODEL_TEAM`, `HTTP_REQUEST_METHOD_POST` | + +### Modules, directories, and files + +- Module directories: **PascalCase**, prefer one word (`Teams`, `Storage`, `Functions`). Standard abbreviations are fine (`VCS`, `JWT`, `SMTP`). +- HTTP directories nest resources and properties to mirror the URL. Do not repeat the module or parent segment in child directory names when context is already clear. Action files are limited to `Get.php`, `Create.php`, `Update.php`, `Delete.php`, and `XList.php` (`XList` because `List` is a PHP reserved word). Model non-CRUD operations as property updates (`Memberships/Status/Update.php`, not `Block.php`). See `src/Appwrite/Platform/AGENTS.md` for full HTTP layout rules. +- Worker and task classes: PascalCase, domain noun (`Functions`, `Builds`). +- `bin/` entry points: **kebab-case** with a role prefix (`worker-functions`, `schedule-executions`). + +### Action, worker, and task identifiers + +`getName()` values are registered identifiers -- keep them stable. + +- **HTTP actions**: camelCase `{verb}` or `{verb}{Qualifier}` -- use the shortest form that remains unique within the module. Prefer `create`, `list`, `get`, `update`, `delete`; add a qualifier only when needed (`createStringColumn`, `createTemplateDeployment`). +- **Workers**: lowercase plural noun -- `functions`, `executions`, `messaging`. +- **Tasks**: lowercase, matching the bin script -- check siblings in `src/Appwrite/Platform/Tasks/`. + +### HTTP API + +- **Paths**: lowercase, **kebab-case** where needed, plural resources -- `/v1/teams/:teamId/memberships`. +- **Route params**: camelCase with `Id` suffix when multiple IDs appear in one handler -- `:teamId`, `:deploymentId`. Omit the resource prefix when a segment already identifies it and only one ID is in scope. +- **Request/response JSON**: camelCase (`teamId`, `documentSecurity`). System fields keep Appwrite prefixes (`$id`, `$createdAt`). +- **Scopes**: `{resource}.{read\|write}` (`teams.write`, `documents.read`); special scopes (`account`, `public`). +- **Events**: dot-separated path with bracketed placeholders -- `teams.[teamId].create`. Each segment adds hierarchy; do not repeat a parent segment in a child label. +- **Audit labels**: `audits.event` as `{resource}.{action}`; `audits.resource` as `{type}/{id}`. +- **SDK `Method` labels**: `namespace` and `group` carry service context (usually lowercase plural); `name` is the operation verb only (`create`, `list`, `get`). + +### Database and documents + +- **Collection IDs**: lowercase plural nouns (`users`, `teams`, `deployments`). +- **Document attributes**: camelCase (`databaseId`, `enabled`). Do not prefix with the collection name (`teamName` on a team document → `name`). +- **`resourceType` values**: plural lowercase -- `'functions'`, `'sites'`, `'deployments'`. + +### Dependency injection + +Use `{role}For{Target}` only when multiple resources of that role coexist in one handler: + +- `dbForProject`, `dbForPlatform`; `queueForEvents`, `queueForWebhooks`; `publisherForBuilds`, `publisherForDatabase`; `deviceForLocal`, `deviceForSites` + +Register new injections alongside existing ones in `app/init/resources.php` and `app/init/resources/request.php`. + +### Response models + +- Model classes: PascalCase (`Variable`, `ColumnURL`); `getName()` returns the same string. +- `Response::MODEL_*` constants: `SCREAMING_SNAKE_CASE`; values are camelCase -- singular (`'team'`), `{name}List` for lists (`'teamList'`). + +### Environment variables + +- Prefix `_APP_`, **SCREAMING_SNAKE_CASE** -- `_APP_REDIS_HOST`, `_APP_FUNCTIONS_QUEUE_NAME`. + +### Tests + +- **E2E**: `tests/e2e/Services/{Service}/` mirrors the API service. Shared logic in `{Service}Base` traits; suites as `{Feature}{ConsoleClientTest|CustomClientTest|CustomServerTest}`. +- **E2E methods**: `test{Verb}` or `test{Verb}{Qualifier}` -- `testCreateTeam`, `testListProjectsQuerySelect`. Omit the service name when the test class already implies it. +- **Unit**: path mirrors source under `tests/unit/`; class `{ClassUnderTest}Test`. + +### Tracing span keys + +Use `snake_case`; dots only for parent/child relationships (`project.id`, `storage.bucket.id`). See [Tracing with Utopia Span](#tracing-with-utopia-span) for full rules. + ## Tracing with Utopia Span In handlers, only call `Span::add($key, $value)`. **Never** call `Span::init`, `setError`, or `Span::finish` -- lifecycle is owned by the entry-point harness (`app/http.php`, `app/worker.php`, `app/realtime.php`, `Bus::dispatch`). For selective export, filter in the sampler in `app/init/span.php`. From 78f74628d67afdf64f7011b518c4eb9846413fac Mon Sep 17 00:00:00 2001 From: eldadfux Date: Wed, 1 Jul 2026 07:26:53 -0400 Subject: [PATCH 07/13] docs(AGENTS): update naming conventions to enforce REST-only operations and prohibit RPC-style verbs in HTTP and SDK methods --- AGENTS.md | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 53c03c7bca..f8d69a03ee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -56,7 +56,7 @@ Tasks/ -- CLI task implementations HTTP endpoint nesting reflects the URL path. Sub-resources get subdirectories. For example, within the Functions module: `Http/Deployments/Template/Create.php` -> `POST /v1/functions/:functionId/deployments/template` -File names in Http directories must only be `Get.php`, `Create.php`, `Update.php`, `Delete.php`, or `XList.php`. For non-CRUD operations, model the endpoint as a property update. For example, updating a team membership status lives at `Teams/Http/Memberships/Status/Update.php` (`PATCH /v1/teams/:teamId/memberships/:membershipId/status`). +File names in Http directories must only be `Get.php`, `Create.php`, `Update.php`, `Delete.php`, or `XList.php`. For non-CRUD operations, model the endpoint as a property update. For example, updating a team membership status lives at `Teams/Http/Memberships/Status/Update.php` (`PATCH /v1/teams/:teamId/memberships/:membershipId/status`). RPC-style action names (`verifyDomain`, `blockUser`) are not permitted -- see [Naming conventions](#naming-conventions). Register new modules in `src/Appwrite/Platform/Appwrite.php`. Detailed module guide: `src/Appwrite/Platform/AGENTS.md`. @@ -125,6 +125,7 @@ Follow PSR-12/PSR-4 defaults unless noted below. These principles apply everywhe 2. **Prefer single words.** Use one word when an existing term is unambiguous in context. Reserve compound or concatenated names for cases where no single word communicates the meaning without ambiguity. 3. **Do not repeat enclosing context.** Parent namespaces already establish scope -- HTTP path segments, directory layout, module name, class namespace, route prefix, or container/module registration. Local names must not restate that context. 4. **Prefer established terms.** When several names are equally clear, choose the one that matches conventions already used in the same module, service, or layer. Consistency across the codebase outweighs local preference. +5. **REST verbs only on the HTTP surface.** Routes, action files, `getName()` identifiers, and SDK method names must map to standard REST operations: `create`, `get`, `list`, `update`, `delete`. Do not introduce imperative or RPC-style verbs (`verify`, `block`, `send`, `confirm`). Express the behavior as a resource or property and apply a REST verb to it. When in doubt, match the nearest existing module that follows these rules. Legacy code may not conform -- **do not copy outdated patterns by default**. If existing code in the area you are editing violates these principles, call it out in review or in your change description rather than extending the inconsistency. New code should follow this document; opportunistic clean-up of nearby naming is welcome when scope allows. @@ -137,9 +138,33 @@ When in doubt, match the nearest existing module that follows these rules. Legac | `Modules/Project/Http/Project/Platforms/Android/` | `createProjectAndroidPlatform` | `create` | | SDK label with `namespace: 'teams'` | `name: 'createTeam'` | `name: 'create'` | | Handler injected with `$project` | `$projectDocument`, `$currentProject` | `$project` | +| Domain verification flow | `verifyDomain`, `Verify.php` | `createVerification`, `updateVerification` (`Verification/Create.php`, `Verification/Update.php`) | +| User verification flow | `verifyUser` | `createVerification`, `updateVerification` | +| Session expiry change | `expireSession`, `logoutSession` | `updateSession` (`PATCH .../sessions/:sessionId`) | Add qualifiers only when they disambiguate: `createStringColumn` (type-specific), `:deploymentId` (multiple IDs in one route), `publisherForBuilds` (several publishers in one handler). +### REST-only HTTP and SDK operations + +HTTP routes and generated SDK methods **strictly follow REST**. The operation is always one of five verbs applied to a **noun** (resource or property) -- never a custom action verb. + +| REST verb | HTTP method | Action file | SDK `name` | Example route | +|-----------|-------------|-------------|------------|---------------| +| `create` | `POST` | `Create.php` | `create` | `POST /v1/account/verifications` | +| `get` | `GET` | `Get.php` | `get` | `GET /v1/teams/:teamId` | +| `list` | `GET` | `XList.php` | `list` | `GET /v1/teams` | +| `update` | `PATCH` / `PUT` | `Update.php` | `update` | `PATCH /v1/account/sessions/:sessionId` | +| `delete` | `DELETE` | `Delete.php` | `delete` | `DELETE /v1/teams/:teamId` | + +**Allowed** -- verb + resource/property noun: `createVerification`, `updateVerification`, `updateSession`, `updateStatus`, `createDeployment`. + +**Not allowed** -- custom imperative verbs: `verifyDomain`, `verifyUser`, `blockUser`, `sendEmail`, `confirmPhone`. Refactor these into a resource or property under a REST verb: + +- `verifyDomain` → `createVerification` or `updateVerification` on a `verification` sub-resource (`POST` / `PATCH .../domains/:domainId/verification`) +- `blockUser` → `updateStatus` on a `status` property (`PATCH .../users/:userId/status`) + +The URL path, directory nesting, action class, `getName()`, and SDK `Method` label must all describe the **same** REST operation. Reject proposals that add new action file names, route segments, or SDK methods outside this set. + ### PHP code | Kind | Style | Examples | @@ -160,19 +185,19 @@ Add qualifiers only when they disambiguate: `createStringColumn` (type-specific) `getName()` values are registered identifiers -- keep them stable. -- **HTTP actions**: camelCase `{verb}` or `{verb}{Qualifier}` -- use the shortest form that remains unique within the module. Prefer `create`, `list`, `get`, `update`, `delete`; add a qualifier only when needed (`createStringColumn`, `createTemplateDeployment`). +- **HTTP actions**: camelCase `{restVerb}` or `{restVerb}{Resource}` where `{restVerb}` is one of `create`, `get`, `list`, `update`, `delete`. Examples: `createVerification`, `updateSession`, `updateStatus`. Never use RPC verbs (`verifyDomain`, `blockUser`). Add a resource qualifier when the verb alone is ambiguous within the module (`createStringColumn`, `createTemplateDeployment`). - **Workers**: lowercase plural noun -- `functions`, `executions`, `messaging`. - **Tasks**: lowercase, matching the bin script -- check siblings in `src/Appwrite/Platform/Tasks/`. ### HTTP API -- **Paths**: lowercase, **kebab-case** where needed, plural resources -- `/v1/teams/:teamId/memberships`. +- **Paths**: lowercase, **kebab-case** where needed, plural resources -- `/v1/teams/:teamId/memberships`. Paths name **resources and properties**, not actions. - **Route params**: camelCase with `Id` suffix when multiple IDs appear in one handler -- `:teamId`, `:deploymentId`. Omit the resource prefix when a segment already identifies it and only one ID is in scope. - **Request/response JSON**: camelCase (`teamId`, `documentSecurity`). System fields keep Appwrite prefixes (`$id`, `$createdAt`). - **Scopes**: `{resource}.{read\|write}` (`teams.write`, `documents.read`); special scopes (`account`, `public`). - **Events**: dot-separated path with bracketed placeholders -- `teams.[teamId].create`. Each segment adds hierarchy; do not repeat a parent segment in a child label. - **Audit labels**: `audits.event` as `{resource}.{action}`; `audits.resource` as `{type}/{id}`. -- **SDK `Method` labels**: `namespace` and `group` carry service context (usually lowercase plural); `name` is the operation verb only (`create`, `list`, `get`). +- **SDK `Method` labels**: `namespace` and `group` carry service context (usually lowercase plural); `name` must be a REST verb only (`create`, `get`, `list`, `update`, `delete`) -- never `verify`, `block`, or other RPC verbs. ### Database and documents From 0d3ed67c6e2ed1a92ea0231879402d5130438707 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Wed, 1 Jul 2026 07:30:37 -0400 Subject: [PATCH 08/13] docs(AGENTS): update PHPStan level from 3 to 4 and add Rector to the project dependencies --- AGENTS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f8d69a03ee..fd67a542e0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,7 +13,7 @@ Self-hosted Backend-as-a-Service platform. Hybrid monolithic-microservice archit | `composer format` | Auto-format code (Pint, PSR-12) | | `composer format ` | Format a specific file | | `composer lint ` | Check formatting of a file | -| `composer analyze` | Static analysis (PHPStan level 3) | +| `composer analyze` | Static analysis (PHPStan level 4) | | `composer check` | Same as `analyze` | | `composer refactor:check` | Rector dry-run over `tests/` (CI "Refactor" check) | | `composer refactor` | Apply Rector fixes | @@ -25,7 +25,7 @@ Self-hosted Backend-as-a-Service platform. Hybrid monolithic-microservice archit - MongoDB (default), MariaDB, MySQL, PostgreSQL (adapters via utopia-php/database) - Redis (cache, queue, pub/sub) - Docker + Traefik (reverse proxy) -- PHPUnit 12, Pint (PSR-12), PHPStan level 3 +- PHPUnit 12, Pint (PSR-12), PHPStan level 4, Rector ## Project layout From 62db0d78f22467a59a5707a316cdc89761cca248 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Wed, 1 Jul 2026 18:53:59 +0530 Subject: [PATCH 09/13] fix: remove duplicate Query import in ProjectsConsoleClientTest --- tests/e2e/Services/Projects/ProjectsConsoleClientTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 40177e3a6f..9133818332 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -14,7 +14,6 @@ use Tests\E2E\Scopes\SideClient; use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; -use Utopia\Database\Query; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; use Utopia\Database\Query; From 91d2c3a4c166f4da1f231f34e4a668f25656f1b1 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Wed, 1 Jul 2026 19:24:58 +0530 Subject: [PATCH 10/13] test: remove unnecessary comments from accessedAt sort tests --- tests/e2e/Services/Projects/ProjectsConsoleClientTest.php | 6 ------ tests/e2e/Services/Users/UsersBase.php | 6 ------ 2 files changed, 12 deletions(-) diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php index 9133818332..f8de004a6a 100644 --- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php +++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php @@ -1532,9 +1532,6 @@ final class ProjectsConsoleClientTest extends Scope $this->assertEquals(404, $response['headers']['status-code']); - /** - * Test for SUCCESS orderDesc by accessedAt - */ $response = $this->client->call(Client::METHOD_GET, '/projects', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1546,9 +1543,6 @@ final class ProjectsConsoleClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); - /** - * Test for SUCCESS orderAsc by accessedAt - */ $response = $this->client->call(Client::METHOD_GET, '/projects', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 989282276d..316f63f4e0 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -1157,9 +1157,6 @@ trait UsersBase $this->assertEquals($user['body']['message'], 'User with the requested ID could not be found.'); $this->assertEquals($user['body']['type'], 'user_not_found'); - /** - * Test for SUCCESS orderDesc by accessedAt - */ $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -1172,9 +1169,6 @@ trait UsersBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertNotEmpty($response['body']['users']); - /** - * Test for SUCCESS orderAsc by accessedAt - */ $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], From d09998d3c1832f7e6b86fb4c2fdabd40543cbb16 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Thu, 2 Jul 2026 11:07:22 +0530 Subject: [PATCH 11/13] feat: add V25 migration to create _key_accessedAt index on projects --- src/Appwrite/Migration/Migration.php | 1 + src/Appwrite/Migration/Version/V25.php | 69 ++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src/Appwrite/Migration/Version/V25.php diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 77c62bce96..8bc0ced6dd 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -98,6 +98,7 @@ abstract class Migration '1.9.3' => 'V24', '1.9.4' => 'V24', '1.9.5' => 'V24', + '1.10.0' => 'V25', ]; /** diff --git a/src/Appwrite/Migration/Version/V25.php b/src/Appwrite/Migration/Version/V25.php new file mode 100644 index 0000000000..800b9b451f --- /dev/null +++ b/src/Appwrite/Migration/Version/V25.php @@ -0,0 +1,69 @@ +migrateCollections(); + } + + /** + * Migrate Collections. + * + * @return void + * @throws Exception|Throwable + */ + private function migrateCollections(): void + { + $projectInternalId = $this->project->getSequence(); + + if (empty($projectInternalId)) { + throw new Exception('Project ID is null'); + } + + $collectionType = match ($projectInternalId) { + 'console' => 'console', + default => 'projects', + }; + + $collections = $this->collections[$collectionType]; + + foreach ($collections as $collection) { + $id = $collection['$id']; + + if (empty($id)) { + continue; + } + + Console::log("Migrating collection \"{$id}\""); + + $this->dbForProject->purgeCachedCollection($id); + $this->dbForProject->purgeCachedDocument(Database::METADATA, $id); + + switch ($id) { + case 'projects': + if ($collectionType === 'console') { + try { + $this->createIndexFromCollection($this->dbForProject, $id, '_key_accessedAt'); + } catch (Throwable $th) { + Console::warning("Failed to create index \"_key_accessedAt\" from {$id}: {$th->getMessage()}"); + } + } + $this->dbForProject->purgeCachedCollection($id); + break; + } + } + } +} From bfbdd5be86b994efca2f24f086fbcf4186e49c3c Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Thu, 2 Jul 2026 11:11:45 +0530 Subject: [PATCH 12/13] fix: map 1.9.6 to V25 migration --- src/Appwrite/Migration/Migration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 8bc0ced6dd..93d8994d7c 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -98,7 +98,7 @@ abstract class Migration '1.9.3' => 'V24', '1.9.4' => 'V24', '1.9.5' => 'V24', - '1.10.0' => 'V25', + '1.9.6' => 'V25', ]; /** From 923e413358da68630c41b9c2b3fa96213895d5cf Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Thu, 2 Jul 2026 11:20:52 +0530 Subject: [PATCH 13/13] fix: map 2.0.0 to V25 migration --- src/Appwrite/Migration/Migration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 93d8994d7c..96f16ca57f 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -98,7 +98,7 @@ abstract class Migration '1.9.3' => 'V24', '1.9.4' => 'V24', '1.9.5' => 'V24', - '1.9.6' => 'V25', + '2.0.0' => 'V25', ]; /**