Move composer version bound rules to composer-based set - #747
Merged
Conversation
…d registrations from version sets
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.
The three remaining rules that declare a
ComposerPackageConstraintwere registered in several PHPUnit version sets, repeated so that a direct upgrade from an older version still picks them up:The composer package constraint already handles that, so the repetition is not needed. They move into
composer-based.php, which the version sets import:MockObjectArgCreateStubToCreateMockRector>=11.0AssertContainsOnlyMethodCallRector>=11.5AssertIsTypeMethodCallRector>=11.5phpunit110.php,phpunit120.phpandphpunit130.phpnow importPHPUnitSetList::COMPOSER_BASEDinstead of listing the rules, so no set loses a rule.Side effect worth a look: importing
COMPOSER_BASEDalso brings its annotation to attribute rules into those three version sets. Those rules are bound tophpunit/phpunit >=10.0, so they are active for any project on 11 or newer - which is what a direct upgrade from a pre-attribute version needs anyway.phpunit-mock-to-stub.phpkeeps its ownMockObjectArgCreateStubToCreateMockRectorregistration - that one is thematic, not a version repetition.