Test the lowest allowed dependency set in CI - #672
Open
fain182 wants to merge 2 commits into
Open
Conversation
composer.lock is not committed, so every CI job resolved to the newest release allowed by composer.json: the lower bounds of the declared constraints were never executed, even though consumers installing arkitect as a dev dependency often end up on them. Adding that job to the matrix surfaced three problems: - with phpstan/phpdoc-parser v1 the docblock nodes carried no line numbers, because on v1 they are opt-in through the $usedAttributes constructor argument (on v2 they are already requested through ParserConfig). Dependencies declared in docblocks were still detected, but reported on the wrong line, so violations pointed at the wrong place - phpstan/phpdoc-parser below 1.20 lexes `@ORM\Id` as the `ORM` tag, so doctrine-like annotations were collected under a truncated FQCN and the rules on them silently did not match - nikic/php-parser below 5.3 cannot parse property hooks, so any file using them produced no class description at all despite 8.4 being an accepted --target-php-version The version constraints are raised to the lowest release that actually works, and mikey179/vfsstream to the first one that runs on PHP 8: 1.6.0 uses curly brace string offsets, removed in PHP 8. The Composer cache key was keyed on a composer.lock that does not exist, which made it a constant shared by every job; it now includes the PHP version and the resolution strategy. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WMkvCCKkaZe1CU1cUREKQN
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #672 +/- ##
============================================
+ Coverage 97.58% 97.77% +0.18%
Complexity 767 767
============================================
Files 102 102
Lines 2198 2198
============================================
+ Hits 2145 2149 +4
+ Misses 53 49 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
codecov/patch reported 0.00% of the previous commit's diff as hit: the only executable line it added is the phpstan/phpdoc-parser v1 branch of DocblockParserFactory, and coverage was measured only in the job installing the newest allowed dependencies, where that branch is dead code by construction. Any change to version compatibility code would have been reported the same way. Coverage is now measured on both PHP 8.0 jobs and uploaded with a flag naming the dependency set, so the merge of the two reports describes src. Codecov waits for both uploads before computing the status, otherwise it would compute it against whichever report arrives first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WMkvCCKkaZe1CU1cUREKQN
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.
composer.lock is not committed, so every CI job resolved to the newest release allowed by composer.json: the lower bounds of the declared constraints were never executed, even though consumers installing arkitect as a dev dependency often end up on them.
Adding that job to the matrix surfaced three problems:
@ORM\Idas theORMtag, so doctrine-like annotations were collected under a truncated FQCN and the rules on them silently did not matchThe version constraints are raised to the lowest release that actually works, and mikey179/vfsstream to the first one that runs on PHP 8: 1.6.0 uses curly brace string offsets, removed in PHP 8.
The Composer cache key was keyed on a composer.lock that does not exist, which made it a constant shared by every job; it now includes the PHP version and the resolution strategy.
Claude-Session: https://claude.ai/code/session_01WMkvCCKkaZe1CU1cUREKQN