Address Copilot CI feedback from #11 - #12
Closed
slashrsm wants to merge 3 commits into
Closed
Conversation
- Validate composer.lock when present - Include composer.lock in cache key hash - Declare php >=8.2 to match the CI matrix
There was a problem hiding this comment.
Pull request overview
This PR follows up on #11 by tightening CI/composer behavior to better align with the PHP 8.2–8.5 test matrix and improve Composer cache invalidation.
Changes:
- Add a PHP platform requirement to
composer.json(>=8.2). - Update CI to validate
composer.lockwhen present. - Include both
composer.jsonandcomposer.lockin the Composer cache key hash.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| composer.json | Declares the minimum supported PHP version to align package requirements with the CI matrix. |
| .github/workflows/test.yml | Adjusts Composer validation behavior and strengthens the cache key to account for lockfile changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "docs": "https://portphp.readthedocs.org" | ||
| }, | ||
| "require": { | ||
| "php": ">=8.2", |
Comment on lines
+34
to
+38
| if [ -f composer.lock ]; then | ||
| composer validate --strict | ||
| else | ||
| composer validate --strict --no-check-lock | ||
| fi |
- Use ^8.2 instead of >=8.2 so Composer does not accept PHP 9+ by default - Prefer composer install when a lockfile is present
| "docs": "https://portphp.readthedocs.org" | ||
| }, | ||
| "require": { | ||
| "php": "^8.2", |
| @@ -30,18 +30,28 @@ jobs: | |||
|
|
|||
|
|
|||
| - name: Validate composer.json | |||
Comment on lines
+51
to
+54
| composer install --prefer-dist --no-progress | ||
| else | ||
| composer update --prefer-dist --no-progress | ||
| fi |
- Pass --no-interaction on composer validate/install/update - Rename validate step to reflect lockfile handling
slashrsm
added a commit
that referenced
this pull request
Jul 22, 2026
Contributor
Author
|
Merged to master via git squash (gh OAuth lacks workflow scope for PR merge API). |
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.
Summary
Follow-up to #11 addressing Copilot review comments.
"php": "^8.2"to match the tested matrix (excludes PHP 9+ by default)composer.lockwhen presentcomposer installwhen a lockfile is presentcomposer.jsonandcomposer.lockin the cache key--no-interactionTest plan