Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: composer
directory: /
schedule:
interval: weekly
day: monday
time: '06:00'
timezone: Europe/Berlin
open-pull-requests-limit: 5
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
time: '06:30'
timezone: Europe/Berlin
open-pull-requests-limit: 5
1 change: 1 addition & 0 deletions .github/release-signers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sympress-release namespaces="git" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhX8/kqoS+ZXc++o0rUuat2tlSTnAew/aqksSxOjT2K
40 changes: 40 additions & 0 deletions .github/workflows/composer-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Scheduled Composer compatibility

on:
schedule:
- cron: '23 3 * * *'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: scheduled-composer-compatibility
cancel-in-progress: false

jobs:
compatibility:
uses: ./.github/workflows/package-installation.yml
report-failure:
if: ${{ always() && needs.compatibility.result == 'failure' }}
needs: compatibility
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
contents: read
issues: write
steps:
- name: Open or update one compatibility incident
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
title='Scheduled Composer compatibility failed'
body="The minimum/latest stable Composer recovery matrix failed. Inspect $RUN_URL before widening or updating the supported Composer range. This issue is updated by the scheduled compatibility workflow."
number=$(gh issue list --state open --search "$title in:title" --limit 100 --json number,title --jq '.[] | select(.title == "Scheduled Composer compatibility failed") | .number' | head -n 1)
if [[ -n "$number" ]]; then
gh issue edit "$number" --body "$body"
else
gh issue create --title "$title" --body "$body"
fi
4 changes: 3 additions & 1 deletion .github/workflows/differential.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Compatibility integration
on:
pull_request:
workflow_dispatch:
workflow_call:

permissions:
contents: read
Expand All @@ -12,7 +13,6 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 20
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH_JSON }}
RUNTIME_TEST_DB_HOST: '127.0.0.1:3306'
RUNTIME_TEST_DB_USER: root
RUNTIME_TEST_DB_PASSWORD: runtime-ci-fixture
Expand All @@ -29,6 +29,8 @@ jobs:
--health-interval=5s --health-timeout=5s --health-retries=20
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Set up compatible oracle PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/package-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: WordPress package installation
on:
pull_request:
workflow_dispatch:
workflow_call:

permissions:
contents: read
Expand All @@ -17,27 +18,29 @@ jobs:
include:
- name: stable
composer: '2.10.3'
library: '2.10.3'
- name: next
composer: snapshot
library: 'dev-main#25612018356ea810bce1b86fba84acd4634b5a96 as 2.10.99'
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH_JSON }}
- name: latest
composer: '2'
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.5.9'
extensions: curl, dom, mbstring, mysqli
tools: composer:${{ matrix.composer }}
coverage: none
- name: Pin the library to the actual selected stable Composer CLI
id: versions
run: |
composer --version --no-ansi | python3 -c 'import os,re,sys; match=re.search(r"Composer version (2\.\d+\.\d+)\b",sys.stdin.read()); assert match, "Expected a stable Composer 2 CLI"; open(os.environ["GITHUB_OUTPUT"],"a").write("library="+match.group(1)+"\n")'
- name: Compare normal and offline placement with real repository packages
run: python3 tools/wpackagist-smoke.py --php php --composer "$(command -v composer)" --composer-library '${{ matrix.library }}'
run: python3 tools/wpackagist-smoke.py --php php --composer "$(command -v composer)" --composer-library '${{ steps.versions.outputs.library }}'
- name: Install and exercise the documented examples
run: python3 tools/smoke-examples.py --php php --composer "$(command -v composer)"
- name: Install the matching Composer library for recovery contract tests
run: |
composer require 'composer/composer:${{ matrix.library }}' --no-update --no-plugins --no-scripts --no-interaction
composer require 'composer/composer:${{ steps.versions.outputs.library }}' --no-update --no-plugins --no-scripts --no-interaction
composer update --no-interaction --no-progress --no-plugins --no-scripts
- name: Repeat recovery tests with warning diagnostics
run: |
Expand Down
115 changes: 115 additions & 0 deletions .github/workflows/platforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Platforms and stable dependencies

on:
pull_request:
push:
branches: [main]
workflow_dispatch:
workflow_call:

permissions:
contents: read

jobs:
platforms:
name: ${{ matrix.os }} / Composer ${{ matrix.composer }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2025, macos-15]
composer: ['2.10.3', '2']
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.5'
extensions: curl, dom, mbstring, mysqli
tools: composer:${{ matrix.composer }}
coverage: none
- name: Resolve stable packages with the selected Composer library
env:
COMPOSER_LINE: ${{ matrix.composer }}
run: |
if [[ "$COMPOSER_LINE" == '2.10.3' ]]; then
composer update --with composer/composer:2.10.3 --no-plugins --no-scripts --no-interaction --no-progress --prefer-dist
else
composer update --no-plugins --no-scripts --no-interaction --no-progress --prefer-dist
fi
composer validate --strict
composer check-platform-reqs
# shellcheck disable=SC2016 # PHP variables must not be expanded by Bash.
php -r 'require "vendor/autoload.php"; $lock = json_decode(file_get_contents("composer.lock"), true, flags: JSON_THROW_ON_ERROR); foreach (array_merge($lock["packages"], $lock["packages-dev"] ?? []) as $package) { if (Composer\Semver\VersionParser::parseStability($package["version"]) !== "stable" || ($package["dist"]["type"] ?? "") === "path") { throw new RuntimeException("Unstable or local dependency: " . $package["name"]); } }'
- name: Use an explicitly case-insensitive APFS fixture volume on macOS
if: runner.os == 'macOS'
run: |
hdiutil create -size 256m -fs APFS -volname RuntimeCaseInsensitive "$RUNNER_TEMP/runtime-case.dmg"
hdiutil attach -nobrowse -mountpoint "$RUNNER_TEMP/runtime-case" "$RUNNER_TEMP/runtime-case.dmg"
mkdir -p "$RUNNER_TEMP/runtime-case/tmp"
echo "TMPDIR=$RUNNER_TEMP/runtime-case/tmp" >> "$GITHUB_ENV"
touch "$RUNNER_TEMP/runtime-case/tmp/CaseProbe"
test -f "$RUNNER_TEMP/runtime-case/tmp/caseprobe"
rm "$RUNNER_TEMP/runtime-case/tmp/CaseProbe"
- name: Exercise portable filesystem and actual Composer relocation contracts
run: php vendor/bin/phpunit --no-logging --fail-on-skipped --fail-on-warning tests/Platform tests/Unit/PackageDestinationTest.php
- name: Detach the macOS fixture volume
if: ${{ always() && runner.os == 'macOS' }}
run: |
echo "TMPDIR=$RUNNER_TEMP" >> "$GITHUB_ENV"
if [[ -d "$RUNNER_TEMP/runtime-case" ]]; then
hdiutil detach "$RUNNER_TEMP/runtime-case"
fi
- name: Record exact toolchain and dependency versions
if: always()
run: |
mkdir -p build/platform-evidence
php --version > build/platform-evidence/php.txt
composer --version > build/platform-evidence/composer.txt
composer show --format=json > build/platform-evidence/packages.json
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: platform-${{ matrix.os }}-composer-${{ matrix.composer }}
path: build/platform-evidence
if-no-files-found: error

lowest:
name: Lowest stable Symfony 8.1 dependency set
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.5'
extensions: curl, dom, mbstring, mysqli
tools: composer:2.10.3
coverage: none
- name: Resolve current stable development tools and lowest production dependencies
run: |
composer update --no-interaction --no-progress --prefer-dist
# Keep QA tool versions current; lower the production boundary and its dependencies.
# shellcheck disable=SC2016 # PHP variables must not be expanded by Bash.
mapfile -t packages < <(php -r '$manifest = json_decode(file_get_contents("composer.json"), true, flags: JSON_THROW_ON_ERROR); foreach (array_keys($manifest["require"]) as $name) { if (str_contains($name, "/")) { echo $name, PHP_EOL; } }')
composer update "${packages[@]}" --prefer-lowest --prefer-stable --with-dependencies --no-interaction --no-progress --prefer-dist
- name: Validate and run strict QA on the lower dependency boundary
run: |
composer validate --strict
composer check-platform-reqs
# shellcheck disable=SC2016 # PHP variables must not be expanded by Bash.
php -r '$manifest = json_decode(file_get_contents("composer.json"), true, flags: JSON_THROW_ON_ERROR); $lock = json_decode(file_get_contents("composer.lock"), true, flags: JSON_THROW_ON_ERROR); $versions = array_column($lock["packages"], "version", "name"); foreach ($manifest["require"] as $name => $constraint) { if (str_starts_with($name, "symfony/") && !str_starts_with(ltrim($versions[$name], "v"), "8.1.")) { throw new RuntimeException("Lowest Symfony 8.1 boundary was not resolved: " . $name); } }'
composer qa
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: lowest-stable-lock
path: composer.lock
if-no-files-found: error
3 changes: 1 addition & 2 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches: [main]
workflow_dispatch:
workflow_call:

permissions:
contents: read
Expand All @@ -24,5 +25,3 @@ jobs:
uses: sympress/workflows/.github/workflows/sympress-qa.yml@v1
with:
php_version: '8.5'
secrets:
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}
Loading
Loading