Skip to content

Commit 58bdd2b

Browse files
committed
release: validate composer.json (the PIE/Packagist manifest)
Distribution is PIE/Packagist, which read composer.json, but the release gate only validated package.xml (the pecl build helper). Add `composer validate --strict --no-check-publish` so a broken manifest fails the release. Add composer to the setup-php tools. (PIE install itself resolves from Packagist by package name, so it can't be exercised pre-publish in the same run; composer validate is the meaningful pre-tag gate for that channel.) https://claude.ai/code/session_017skw8BsHkF8wur7Pf4G9W5
1 parent 3ddc2cd commit 58bdd2b

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333
exit 1
3434
fi
3535
36-
- name: Set up PHP with pecl/pear
36+
- name: Set up PHP with pecl/pear and composer
3737
uses: shivammathur/setup-php@v2
3838
with:
3939
php-version: '8.3'
40-
tools: pecl
40+
tools: pecl, composer
4141

4242
- name: Check version metadata is in sync with the tag
4343
run: |
@@ -51,9 +51,14 @@ jobs:
5151
exit 1
5252
fi
5353
54-
- name: Validate package.xml
54+
- name: Validate package.xml (PECL build helper)
5555
run: pecl package-validate
5656

57+
- name: Validate composer.json (PIE / Packagist manifest)
58+
# PIE and Packagist read composer.json, so it gates the actual
59+
# distribution channel. --strict also fails on warnings.
60+
run: composer validate --strict --no-check-publish
61+
5762
- name: Build and run the full CI test suite
5863
# Reuse the same script the build matrix uses: it runs the phpt suite
5964
# (when run-tests.php is available) plus the OOM-hook / safe_read /

0 commit comments

Comments
 (0)