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

[CodingStyle] Remove RemoveUnusedAliasRector, job rather for coding standard tool and opinonated #1157

Merged
merged 2 commits into from
Nov 5, 2021

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Nov 5, 2021

After many complex failed efforts to make this rule work #1148, #1149, #1147, #1146, to make PHPStan parser work #1144, it's time to rethign this rule.

Complexity with aliasesed, same-named, conflicting short/class names is enormous and maybe Rector is not quite right tool to handle coding standards. Also, some uses prefer to keep alias for better readability :)

Using this rule goes agains subjective descissions. It is similar to removal of MoveVariableDeclarationNearReferenceRector for high complexity and very unrealiable behavior in the practise.

Ref #900

Saying that, this rule should be deprecated to keep Rector in more reliable scope and let users decide better, mabye with PHPStan rule, how such code should be refacoted.

@TomasVotruba TomasVotruba enabled auto-merge (squash) November 5, 2021 14:17
@TomasVotruba TomasVotruba merged commit 49aa15d into main Nov 5, 2021
@TomasVotruba TomasVotruba deleted the tv-depre-short-alias branch November 5, 2021 14:19
@TomasVotruba TomasVotruba changed the title [CodingStyle] Deprecate RemoveUnusedAliasRector, job rather for coding standard tool and opinonated [CodingStyle] Remove RemoveUnusedAliasRector, job rather for coding standard tool and opinonated Nov 5, 2021
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