Fix Rector invalidation in case of changes sets or rules#4902
Merged
TomasVotruba merged 1 commit intomainfrom Sep 3, 2023
Merged
Fix Rector invalidation in case of changes sets or rules#4902TomasVotruba merged 1 commit intomainfrom
TomasVotruba merged 1 commit intomainfrom
Conversation
126b617 to
eceee6e
Compare
This was referenced Sep 3, 2023
Member
|
@TomasVotruba it seems doesn't work on |
samsonasik
reviewed
Sep 3, 2023
Comment on lines
+218
to
+220
|
|
||
| // for cache invalidation in case of change | ||
| SimpleParameterProvider::addParameter(Option::REGISTERED_RECTOR_RULES, $rectorClass); |
Member
There was a problem hiding this comment.
@TomasVotruba add parameter without merge seems cause double register:
'registered_rector_rules' => array (2)
| 0 => 'Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector'
| 1 => 'Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector'
Member
There was a problem hiding this comment.
@TomasVotruba here test case when rule not changed 3ab9ae9 at PR:
Member
There was a problem hiding this comment.
@TomasVotruba the test case seems working ok now at PR:
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.
Currently, when a new rule or sets is registered, the parameters hash is the same. The
FileHashComputeruses\Rector\Core\Configuration\Parameter\SimpleParameterProvider::hash()and ignored new rules/sets.This PR fixes it 👍