Repository navigation
feat!: discover PHP versions from Composer constraints - #15
Merged
Merged
Conversation
|
Hi, thank you for creating your PR, we will check it out very soon |
|
PHP lint results Lint: 0 errors · 0 warnings in 1 diagnostic report(s). Lint detailsLint resultsLint Checks
|
|
PHP test results Test: 1 passed · 0 failed · 0 skipped. Test detailsTest resultsTest Results
Coverage: 1 source report(s); percentages remain separate. Coverage detailsCoverage resultsCoverage
Overall: 100.00% 🟢 |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
neilime
force-pushed
the
feat/composer-php-version-discovery
branch
2 times, most recently
from
November 10, 2026 23:43
1943175 to
9d5b836
Compare
This was referenced Nov 10, 2026
neilime
force-pushed
the
feat/composer-php-version-discovery
branch
8 times, most recently
from
November 11, 2026 11:21
3086d25 to
7bb679c
Compare
Use Composer constraints for automatic CI matrices and default setup, with a shared Docker resolver for local builds. BREAKING CHANGE: Default CI tests every stable PHP minor allowed by require.php. Projects without a PHP constraint must declare one or select PHP explicitly.
neilime
force-pushed
the
feat/composer-php-version-discovery
branch
from
November 11, 2026 14:31
7bb679c to
2282d76
Compare
1 of 5 tasks
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.
PHP discovery remains the implementation in this PR. A FIXME links the upstream parser correction; the native Node.js conversion is prepared separately in draft #16, pending a fixed stable
composer-semverrelease.When no PHP version is specified, derive it from
composer.jsoninstead of duplicating the support range in a version file and workflow matrix. CI tests the newest compatible stable patch of each minor; standalone setup selects the highest compatible release.get-php-versionsaction using a Docker image, Composer's constraint parser and PHP.net's release catalog. Handle patch bounds and disjoint ranges, retain explicitly supported end-of-life minors, exclude prereleases, and fail clearly when discovery cannot produce a valid result.require.phpindependently of local overrides.github-scriptpublishes the existing outputs using its suppliedexecandcorehelpers. Consumer Makefiles derive its revision from the existing workflow pins, so dependency updates also update local builds without a separate revision setting. Keep dependencies locked and maintained by the existing weekly Dependabot Composer configuration;/actions/**/*covers both the manifest and lockfile without a per-action directory list.ci-github-commonreference from 4.0.0 to 4.2.0, including the generated reporting example; the other 11 dependencies are already current. Preserve full commit pins and existing interfaces.Validation: 18 PHPUnit tests (21 assertions) and the hosted integration suite passed before the dependency refresh. A real Docker test of the actual action script verifies owner-only Composer manifests, both outputs, rejection of missing/outside/symlink/invalid-project paths without outputs, and the unchanged local CLI. The default image runs unprivileged; source mounts reject writes. Trivy and Checkov pass with no exceptions (24 Checkov checks, zero skipped), along with actionlint, tracked-file Zizmor, Hadolint, formatting and documentation checks. All 84 external action/workflow uses were checked against 24 published interfaces, including inputs, secrets and referenced outputs. Hosted CI exercises the action, unchanged runner PHP, automatic matrices, absolute setup paths and explicit overrides.
Compatibility: the Docker action requires Linux with Docker. The image defaults to an unprivileged user; the composite wrapper maps the runner UID/GID, mounts the checkout read-only and publishes outputs from the host. No root-user scanner exemptions are needed. The default CI matrix now includes every stable minor allowed by
require.php. Projects without a PHP constraint must declare one or select a version explicitly. Discovery requires access to PHP.net. Consumer migration PRs will pin this implementation for validation before switching to a stable release. No release or tag is created by this PR.Consumer validation: TWBS #869, ANSI Twig #119, ANSI HTML #167, GeSHi Twig #128, and PHP CSS Lint #234. These draft PRs remove redundant PHP version files/matrices and use the shared resolver for local Docker builds. Their development pins must switch to the stable release before merge.