Check for variable name in parameters before adding to uses#268
Merged
samsonasik merged 5 commits intorectorphp:mainfrom Mar 27, 2025
Merged
Conversation
Member
|
Hi, thanks for the fix. Could you add also failing test fixture, so we have it covered? |
Member
Contributor
Author
|
Sorry about that! The rest of the cases all worked properly which surprised me so maybe there is a better/different fix that should be made for that case? |
Contributor
Author
|
@TomasVotruba and @samsonasik I don't understand the last failing check but I'm happy to try and resolve it if you can point me in the right direction. Thanks! |
Member
|
You can run: to fix ci |
Member
|
cs needs fix, see notice https://github.com/rectorphp/rector-downgrade-php/actions/runs/14113130318/job/39536748104?pr=268#step:6:1 you can run or |
Member
|
Let's give it a try, thank you @bryannielsen |
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.
I hit an issue today in downgrading some Laravel code.
The
ArrowFunctionToAnonymousFunctionRectorrule would take this functionand transform it to this
and this would result in a PHP error
My patch works well for solving my problem but if there's a better way to fix this that would be great too.
Thanks for your hard work!