[Config] Add ruleWithConfigurationComposerVersionBound() - #8244
Merged
TomasVotruba merged 1 commit intoJul 31, 2026
Conversation
…configuration bound to installed package version
Member
Author
|
Ref #7877 |
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.
ComposerPackageConstraintInterfacebinds a whole rule to a package version. There is no way to bind a single configuration item - e.g. oneAnnotationToAttributepair - to the package version that introduced it.This adds a version-bound variant of
ruleWithConfiguration():The configuration is registered only when the analysed project has a matching installed version. Since repeated
ruleWithConfiguration()calls for the same rule class are merged, version-specific pairs stack on top of version-neutral ones across set files:Version resolving reuses
InstalledPackageResolver, so it follows the same rules asComposerPackageConstraintFilter, including thecomposer.jsonconstraint priority added in #8242. An unresolvable version - package not installed - means the configuration is not registered, same as the existing filter.