Repository navigation
Add download-phar script and run require-checker and normalize as PHARs - #46
Merged
Merged
Conversation
hugo-goncalves-kununu
force-pushed
the
download-phar
branch
2 times, most recently
from
November 3, 2026 16:41
f23691d to
bb6e993
Compare
- bin/download-phar keeps tools/<tool>.phar on the latest GitHub release of a tool - composer-require-checker and composer-normalize are no longer require-dev dependencies; the require-checker and normalize-check scripts download and run their PHARs instead - CommandTestCase registers commands with addCommands(), as addCommand() needs Symfony Console 7.4 - Raise vimeo/psalm to ^6.20 and phpunit/phpunit to ^13.4, and migrate phpunit.xml.dist Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hugo-goncalves-kununu
force-pushed
the
download-phar
branch
from
November 3, 2026 16:47
bb6e993 to
162818f
Compare
hugo-goncalves-kununu
marked this pull request as ready for review
November 3, 2026 17:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The objective of this PR is to add a
download-pharscript that keeps a tool's PHAR on its latest GitHub release, and to use it so that Composer Require Checker and Composer Normalize stop beingrequire-devdependencies.As dependencies, their own requirements constrain what a project can install. For example, Composer Require Checker 4.18+ needs
symfony/console^7, which blocks a Symfony 6.4 test leg. Composer Require Checker's upstream also recommends the PHAR.Details
bin/download-phar(new, registered incomposer.jsonbin)download-phar <tool> <owner/repository> <release-asset> [directory]; the directory defaults totools, relative to the working directoryreleases/latestredirect with aHEADrequest (no download, no API rate limit), and downloads the asset only when<tool>.versionholds a different tag<tool>.phar.tmpand renames, so an interrupted download never replaces a working PHARSTDERRand exits0; every other failure exits1composer.jsonmaglnet/composer-require-checkerandergebnis/composer-normalizefromrequire-dev, and theallow-pluginsentrytool:composer-require-checker,tool:composer-normalize,require-checker,normalize-checkandnormalize-fixscripts;ciuses themvimeo/psalmto^6.20andphpunit/phpunitto^13.4phpunit.xml.distexecutionOrder="defects")tests/PHPCSFixer/Command/CommandTestCase.phpaddCommands()instead ofaddCommand(), which only exists from Symfony Console 7.4lowestPHPUnit leg never caught it because Composer Require Checker forced Console^7.4.1; with it gone,lowestinstalls Console 6.4.github/workflows/continuous-integration.ymlcomposer-require-checkerandcomposer-normalizewithsetup-php, like the sharedbackend_code_tools.yml, instead of usingrequire-devcopies.gitignore/tools/docs/DownloadPhar/README.md, linked from the README tableAGENTS.mdandCONTRIBUTING.mddescribe the PHAR approach (CONTRIBUTING wrongly called these global tools installed viasetup-php)