Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX] Remove AddDefaultValueForUndefinedVariableRector as can generate broken code and depends on context #4729

Merged
merged 2 commits into from
Aug 9, 2023

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Aug 9, 2023

This rule can cause errors in case of added/new/removed variables, as it can think that just removed variable should be added :)
It can cause crashes like these: #4702 (comment)

There was ❗ 9 extra test that colided with other rules just to be sure it doesn't colide with each other. Still not good enough.

Also missing variable raises a warning, so not really deprecation: https://3v4l.org/nMR15

Better let PHPStan report it and fix propperly 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant