[composer-based] Include all configured rules in the composer-based set - #980
Merged
Conversation
Every ruleWithConfiguration() call of the composer triggered Symfony version sets is now also registered here through ruleWithConfigurationComposerVersionBound(), bound to the package and version of the set it comes from. That way a rename, argument or type declaration configuration applies to any project with that package version installed, no matter which version the upgrade started from. Adds a ComposerBasedTest smoke test over the whole set.
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.
Follow-up to #979, which bonded the standalone rules. This adds the configured ones, the same way rector-phpunit #754 does.
What
Every
ruleWithConfiguration()call of the composer triggered Symfony version sets is now also registered inconfig/sets/symfony/composer-based.phpthroughruleWithConfigurationComposerVersionBound(), bound to the package and version of the set it came from:162 configurations, from
symfony/class-loader3.0 up tosymfony/json-streamer7.4 - renames, argument changes, type declarations, annotation to attribute conversions.Effect
The configuration applies to any project with that package version installed, no matter which Symfony version the upgrade started from:
public function run(Helper $helper, Request $request) { - $width = $helper->strlen('some text'); - $contentType = $request->getContentType(); + $width = $helper->width('some text'); + $contentType = $request->getContentTypeFormat(); }Both renames land in one run, from a project that never enabled the
symfony53orsymfony62set.Notes
composer.jsontoo.$arrayType,$scalarArrayObjectUnionType, ...) are defined once at the top of the set.tests/ComposerBasedsmoke test loads the whole set and checks two version-bound renames land.