From 4326600751b29919817d6c5ff327d2c7ad83188f Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 13 Feb 2026 00:56:03 +0000 Subject: [PATCH 1/2] Refactor CI workflows: add COMPOSE_FILE env, add build targets, bump action versions, pin composer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add COMPOSE_FILE=docker-compose.yml to tests, benchmark, and sdk-preview to prevent loading overrides in CI - Add target: development to tests/benchmark builds, target: production to pr-scan/nightly builds - Bump actions/checkout v4→v6, docker/build-push-action v4/v5→v6, actions/upload-artifact v4→v6, actions/github-script v7→v8 - Pin composer images to 2.8 in linter and static-analysis workflows Co-Authored-By: Claude Opus 4.6 --- .github/workflows/benchmark.yml | 8 +++++--- .github/workflows/cleanup-cache.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/linter.yml | 6 +++--- .github/workflows/nightly.yml | 6 +++--- .github/workflows/pr-scan.yml | 9 +++++---- .github/workflows/publish.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .github/workflows/sdk-preview.yml | 5 ++++- .github/workflows/static-analysis.yml | 4 ++-- .github/workflows/tests.yml | 22 ++++++++++++---------- 11 files changed, 40 insertions(+), 32 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 62b4953e27..b7b4fa0d2f 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -3,6 +3,7 @@ concurrency: group: '${{ github.workflow }}-${{ github.ref }}' cancel-in-progress: true env: + COMPOSE_FILE: docker-compose.yml IMAGE: appwrite-dev CACHE_KEY: 'appwrite-dev-${{ github.event.pull_request.head.sha }}' 'on': @@ -13,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: recursive - name: Set up Docker Buildx @@ -28,6 +29,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' outputs: 'type=docker,dest=/tmp/${{ env.IMAGE }}.tar' + target: development build-args: | DEBUG=false TESTING=true @@ -45,7 +47,7 @@ jobs: pull-requests: write steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Load Cache uses: actions/cache@v4 with: @@ -97,7 +99,7 @@ jobs: echo "| 200 | $(jq -r '.statusCodeDistribution."200"|tostring|[while(length>0;.[:-3])|.[-3:]]|reverse|join(",")' benchmark.json) | $(jq -r '.statusCodeDistribution."200"|tostring|[while(length>0;.[:-3])|.[-3:]]|reverse|join(",")' benchmark-latest.json) | " >> benchmark.txt echo "| P99 | $(jq -r '.latencyPercentiles.p99' benchmark.json ) | $(jq -r '.latencyPercentiles.p99' benchmark-latest.json ) | " >> benchmark.txt - name: Save results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 if: '${{ !cancelled() }}' with: name: benchmark.json diff --git a/.github/workflows/cleanup-cache.yml b/.github/workflows/cleanup-cache.yml index 8f25fe5ef6..8f9f05a38c 100644 --- a/.github/workflows/cleanup-cache.yml +++ b/.github/workflows/cleanup-cache.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Cleanup run: | diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a40f07ceda..7edfde0aae 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,7 +34,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 02edd57923..f4ae5df1ce 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 2 @@ -20,9 +20,9 @@ jobs: - name: Validate composer.json and composer.lock run: | - docker run --rm -v $PWD:/app composer sh -c \ + docker run --rm -v $PWD:/app composer:2.8 sh -c \ "composer validate" - name: Run Linter run: | - docker run --rm -v $PWD:/app composer sh -c \ + docker run --rm -v $PWD:/app composer:2.8 sh -c \ "composer install --profile --ignore-platform-reqs && composer lint" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 80d880244c..cd9b3827e7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -10,11 +10,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: recursive - name: Build the Docker image - run: docker build . -t appwrite_image:latest + run: DOCKER_BUILDKIT=1 docker build . --target production -t appwrite_image:latest - name: Run Trivy vulnerability scanner on image uses: aquasecurity/trivy-action@0.20.0 with: @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run Trivy vulnerability scanner on filesystem uses: aquasecurity/trivy-action@0.20.0 with: diff --git a/.github/workflows/pr-scan.yml b/.github/workflows/pr-scan.yml index eded58985d..51f3460d03 100644 --- a/.github/workflows/pr-scan.yml +++ b/.github/workflows/pr-scan.yml @@ -11,19 +11,20 @@ jobs: pull-requests: write steps: - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 submodules: 'recursive' - name: Build the Docker image - uses: docker/build-push-action@v5 - with: + uses: docker/build-push-action@v6 + with: context: . push: false load: true tags: pr_image:${{ github.sha }} + target: production - name: Run Trivy vulnerability scanner on image uses: aquasecurity/trivy-action@0.20.0 @@ -44,7 +45,7 @@ jobs: - name: Process Trivy scan results id: process-results - uses: actions/github-script@v7 + uses: actions/github-script@v8 with: script: | const fs = require('fs'); diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 180eb5428d..cbb7d9dbe0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 2 submodules: recursive @@ -38,7 +38,7 @@ jobs: type=ref,event=tag - name: Build & Publish to DockerHub - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5426f53583..bc706b1ec9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -42,7 +42,7 @@ jobs: type=semver,pattern={{major}} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/sdk-preview.yml b/.github/workflows/sdk-preview.yml index e317845768..986a77399d 100644 --- a/.github/workflows/sdk-preview.yml +++ b/.github/workflows/sdk-preview.yml @@ -1,5 +1,8 @@ name: "SDK Preview" +env: + COMPOSE_FILE: docker-compose.yml + on: pull_request: paths: @@ -19,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set SDK type id: set-sdk diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 1c5f36ace3..a0dc38b3b4 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -8,11 +8,11 @@ jobs: steps: - name: Check out the repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run CodeQL run: | - docker run --rm -v $PWD:/app composer:2.6 sh -c \ + docker run --rm -v $PWD:/app composer:2.8 sh -c \ "composer install --profile --ignore-platform-reqs && composer check" - name: Run Locale check diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc678a72da..4bb2662ab6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,6 +5,7 @@ concurrency: cancel-in-progress: true env: + COMPOSE_FILE: docker-compose.yml IMAGE: appwrite-dev CACHE_KEY: appwrite-dev-${{ github.event.pull_request.head.sha }} @@ -26,7 +27,7 @@ jobs: database_changed: ${{ steps.check.outputs.database_changed }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Fetch base branch run: git fetch origin ${{ github.event.pull_request.base.ref }} @@ -48,7 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: recursive @@ -65,6 +66,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max outputs: type=docker,dest=/tmp/${{ env.IMAGE }}.tar + target: development build-args: | DEBUG=false TESTING=true @@ -86,7 +88,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Load Cache uses: actions/cache@v4 @@ -132,7 +134,7 @@ jobs: pull-requests: write steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Load Cache uses: actions/cache@v4 @@ -217,7 +219,7 @@ jobs: ] steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Load Cache uses: actions/cache@v4 @@ -332,7 +334,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Load Cache uses: actions/cache@v4 @@ -397,7 +399,7 @@ jobs: pull-requests: write steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Load Cache uses: actions/cache@v4 @@ -457,7 +459,7 @@ jobs: ] steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Load Cache uses: actions/cache@v4 @@ -515,7 +517,7 @@ jobs: pull-requests: write steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Load Cache uses: actions/cache@v4 @@ -576,7 +578,7 @@ jobs: ] steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Load Cache uses: actions/cache@v4 From 78e63085cff1b920a40c475d4b60f15305d2f738 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 13 Feb 2026 01:16:35 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Update=20PHPStan=201.8=E2=86=921.12,=20pin?= =?UTF-8?q?=20composer=20images=20to=202.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHPStan 1.8 triggers deprecation warnings on the PHP version shipped with composer:2.8. Upgrading to 1.12 resolves the compatibility issue. Co-Authored-By: Claude Opus 4.6 --- composer.json | 2 +- composer.lock | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index c217b63e6f..354762e90b 100644 --- a/composer.json +++ b/composer.json @@ -91,7 +91,7 @@ "appwrite/sdk-generator": "*", "phpunit/phpunit": "9.*", "swoole/ide-helper": "6.*", - "phpstan/phpstan": "1.8.*", + "phpstan/phpstan": "1.12.*", "textalk/websocket": "1.5.*", "laravel/pint": "1.*", "phpbench/phpbench": "1.*" diff --git a/composer.lock b/composer.lock index ec5fe97db7..58179608ab 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": "57189be7990142e6a44a13eefdfe3043", + "content-hash": "bc64aa37fc3ab6fa2acf7ac8f5456e9f", "packages": [ { "name": "adhocore/jwt", @@ -6238,16 +6238,11 @@ }, { "name": "phpstan/phpstan", - "version": "1.8.11", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "46e223dd68a620da18855c23046ddb00940b4014" - }, + "version": "1.12.32", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46e223dd68a620da18855c23046ddb00940b4014", - "reference": "46e223dd68a620da18855c23046ddb00940b4014", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8", + "reference": "2770dcdf5078d0b0d53f94317e06affe88419aa8", "shasum": "" }, "require": { @@ -6276,8 +6271,11 @@ "static analysis" ], "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.11" + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, "funding": [ { @@ -6287,13 +6285,9 @@ { "url": "https://github.com/phpstan", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" } ], - "time": "2022-10-24T15:45:13+00:00" + "time": "2025-09-30T10:16:31+00:00" }, { "name": "phpunit/php-code-coverage", @@ -8919,5 +8913,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" }