Skip to content

Commit 14368d6

Browse files
Define the 1.x contract and public release gates (#13)
* feat: define stable runtime contracts and public release gates * test: exercise an explicit case-insensitive macOS volume * fix: close contract review findings and platform regressions * fix: preserve Composer proxy ownership across path aliases * fix: support journal file synchronization on Windows * fix: pin the verified tag object through release publication
1 parent c732625 commit 14368d6

187 files changed

Lines changed: 4472 additions & 148 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/dependabot.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
time: '06:00'
9+
timezone: Europe/Berlin
10+
open-pull-requests-limit: 5
11+
- package-ecosystem: github-actions
12+
directory: /
13+
schedule:
14+
interval: weekly
15+
day: monday
16+
time: '06:30'
17+
timezone: Europe/Berlin
18+
open-pull-requests-limit: 5

‎.github/release-signers‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sympress-release namespaces="git" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhX8/kqoS+ZXc++o0rUuat2tlSTnAew/aqksSxOjT2K
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Scheduled Composer compatibility
2+
3+
on:
4+
schedule:
5+
- cron: '23 3 * * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: scheduled-composer-compatibility
13+
cancel-in-progress: false
14+
15+
jobs:
16+
compatibility:
17+
uses: ./.github/workflows/package-installation.yml
18+
report-failure:
19+
if: ${{ always() && needs.compatibility.result == 'failure' }}
20+
needs: compatibility
21+
runs-on: ubuntu-24.04
22+
timeout-minutes: 5
23+
permissions:
24+
contents: read
25+
issues: write
26+
steps:
27+
- name: Open or update one compatibility incident
28+
env:
29+
GH_TOKEN: ${{ github.token }}
30+
GH_REPO: ${{ github.repository }}
31+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
32+
run: |
33+
title='Scheduled Composer compatibility failed'
34+
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."
35+
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)
36+
if [[ -n "$number" ]]; then
37+
gh issue edit "$number" --body "$body"
38+
else
39+
gh issue create --title "$title" --body "$body"
40+
fi

‎.github/workflows/differential.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Compatibility integration
33
on:
44
pull_request:
55
workflow_dispatch:
6+
workflow_call:
67

78
permissions:
89
contents: read
@@ -12,7 +13,6 @@ jobs:
1213
runs-on: ubuntu-24.04
1314
timeout-minutes: 20
1415
env:
15-
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH_JSON }}
1616
RUNTIME_TEST_DB_HOST: '127.0.0.1:3306'
1717
RUNTIME_TEST_DB_USER: root
1818
RUNTIME_TEST_DB_PASSWORD: runtime-ci-fixture
@@ -29,6 +29,8 @@ jobs:
2929
--health-interval=5s --health-timeout=5s --health-retries=20
3030
steps:
3131
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
32+
with:
33+
persist-credentials: false
3234
- name: Set up compatible oracle PHP
3335
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
3436
with:

‎.github/workflows/package-installation.yml‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: WordPress package installation
33
on:
44
pull_request:
55
workflow_dispatch:
6+
workflow_call:
67

78
permissions:
89
contents: read
@@ -17,27 +18,29 @@ jobs:
1718
include:
1819
- name: stable
1920
composer: '2.10.3'
20-
library: '2.10.3'
21-
- name: next
22-
composer: snapshot
23-
library: 'dev-main#25612018356ea810bce1b86fba84acd4634b5a96 as 2.10.99'
24-
env:
25-
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH_JSON }}
21+
- name: latest
22+
composer: '2'
2623
steps:
2724
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
25+
with:
26+
persist-credentials: false
2827
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2928
with:
3029
php-version: '8.5.9'
3130
extensions: curl, dom, mbstring, mysqli
3231
tools: composer:${{ matrix.composer }}
3332
coverage: none
33+
- name: Pin the library to the actual selected stable Composer CLI
34+
id: versions
35+
run: |
36+
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")'
3437
- name: Compare normal and offline placement with real repository packages
35-
run: python3 tools/wpackagist-smoke.py --php php --composer "$(command -v composer)" --composer-library '${{ matrix.library }}'
38+
run: python3 tools/wpackagist-smoke.py --php php --composer "$(command -v composer)" --composer-library '${{ steps.versions.outputs.library }}'
3639
- name: Install and exercise the documented examples
3740
run: python3 tools/smoke-examples.py --php php --composer "$(command -v composer)"
3841
- name: Install the matching Composer library for recovery contract tests
3942
run: |
40-
composer require 'composer/composer:${{ matrix.library }}' --no-update --no-plugins --no-scripts --no-interaction
43+
composer require 'composer/composer:${{ steps.versions.outputs.library }}' --no-update --no-plugins --no-scripts --no-interaction
4144
composer update --no-interaction --no-progress --no-plugins --no-scripts
4245
- name: Repeat recovery tests with warning diagnostics
4346
run: |

‎.github/workflows/platforms.yml‎

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Platforms and stable dependencies
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
workflow_call:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
platforms:
15+
name: ${{ matrix.os }} / Composer ${{ matrix.composer }}
16+
runs-on: ${{ matrix.os }}
17+
timeout-minutes: 15
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-24.04, windows-2025, macos-15]
22+
composer: ['2.10.3', '2']
23+
defaults:
24+
run:
25+
shell: bash
26+
steps:
27+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
28+
with:
29+
persist-credentials: false
30+
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
31+
with:
32+
php-version: '8.5'
33+
extensions: curl, dom, mbstring, mysqli
34+
tools: composer:${{ matrix.composer }}
35+
coverage: none
36+
- name: Resolve stable packages with the selected Composer library
37+
env:
38+
COMPOSER_LINE: ${{ matrix.composer }}
39+
run: |
40+
if [[ "$COMPOSER_LINE" == '2.10.3' ]]; then
41+
composer update --with composer/composer:2.10.3 --no-plugins --no-scripts --no-interaction --no-progress --prefer-dist
42+
else
43+
composer update --no-plugins --no-scripts --no-interaction --no-progress --prefer-dist
44+
fi
45+
composer validate --strict
46+
composer check-platform-reqs
47+
# shellcheck disable=SC2016 # PHP variables must not be expanded by Bash.
48+
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"]); } }'
49+
- name: Use an explicitly case-insensitive APFS fixture volume on macOS
50+
if: runner.os == 'macOS'
51+
run: |
52+
hdiutil create -size 256m -fs APFS -volname RuntimeCaseInsensitive "$RUNNER_TEMP/runtime-case.dmg"
53+
hdiutil attach -nobrowse -mountpoint "$RUNNER_TEMP/runtime-case" "$RUNNER_TEMP/runtime-case.dmg"
54+
mkdir -p "$RUNNER_TEMP/runtime-case/tmp"
55+
echo "TMPDIR=$RUNNER_TEMP/runtime-case/tmp" >> "$GITHUB_ENV"
56+
touch "$RUNNER_TEMP/runtime-case/tmp/CaseProbe"
57+
test -f "$RUNNER_TEMP/runtime-case/tmp/caseprobe"
58+
rm "$RUNNER_TEMP/runtime-case/tmp/CaseProbe"
59+
- name: Exercise portable filesystem and actual Composer relocation contracts
60+
run: php vendor/bin/phpunit --no-logging --fail-on-skipped --fail-on-warning tests/Platform tests/Unit/PackageDestinationTest.php
61+
- name: Detach the macOS fixture volume
62+
if: ${{ always() && runner.os == 'macOS' }}
63+
run: |
64+
echo "TMPDIR=$RUNNER_TEMP" >> "$GITHUB_ENV"
65+
if [[ -d "$RUNNER_TEMP/runtime-case" ]]; then
66+
hdiutil detach "$RUNNER_TEMP/runtime-case"
67+
fi
68+
- name: Record exact toolchain and dependency versions
69+
if: always()
70+
run: |
71+
mkdir -p build/platform-evidence
72+
php --version > build/platform-evidence/php.txt
73+
composer --version > build/platform-evidence/composer.txt
74+
composer show --format=json > build/platform-evidence/packages.json
75+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
76+
if: always()
77+
with:
78+
name: platform-${{ matrix.os }}-composer-${{ matrix.composer }}
79+
path: build/platform-evidence
80+
if-no-files-found: error
81+
82+
lowest:
83+
name: Lowest stable Symfony 8.1 dependency set
84+
runs-on: ubuntu-24.04
85+
timeout-minutes: 15
86+
steps:
87+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
88+
with:
89+
persist-credentials: false
90+
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
91+
with:
92+
php-version: '8.5'
93+
extensions: curl, dom, mbstring, mysqli
94+
tools: composer:2.10.3
95+
coverage: none
96+
- name: Resolve current stable development tools and lowest production dependencies
97+
run: |
98+
composer update --no-interaction --no-progress --prefer-dist
99+
# Keep QA tool versions current; lower the production boundary and its dependencies.
100+
# shellcheck disable=SC2016 # PHP variables must not be expanded by Bash.
101+
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; } }')
102+
composer update "${packages[@]}" --prefer-lowest --prefer-stable --with-dependencies --no-interaction --no-progress --prefer-dist
103+
- name: Validate and run strict QA on the lower dependency boundary
104+
run: |
105+
composer validate --strict
106+
composer check-platform-reqs
107+
# shellcheck disable=SC2016 # PHP variables must not be expanded by Bash.
108+
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); } }'
109+
composer qa
110+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
111+
if: always()
112+
with:
113+
name: lowest-stable-lock
114+
path: composer.lock
115+
if-no-files-found: error

‎.github/workflows/qa.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches: [main]
77
workflow_dispatch:
8+
workflow_call:
89

910
permissions:
1011
contents: read
@@ -24,5 +25,3 @@ jobs:
2425
uses: sympress/workflows/.github/workflows/sympress-qa.yml@v1
2526
with:
2627
php_version: '8.5'
27-
secrets:
28-
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}

0 commit comments

Comments
 (0)