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

Add NoUnneededImportAliasFixer #4498

Open
wants to merge 5 commits into
base: master
from

Conversation

@JakeFr
Copy link

commented Aug 9, 2019

Hi
First fixer, try to implement #4492

JakeFr added some commits Aug 9, 2019

Show resolved Hide resolved README.rst Outdated
*/
public function getPriority()
{
// should be run after the SingleImportPerStatementFixer (for fix separated use statements as well) and NoUnusedImportsFixer (just for save performance) and NoLeadingImportSlashFixer

This comment has been minimized.

Copy link
@julienfalque

julienfalque Aug 12, 2019

Member

IMO this new fixer should be able to deal with grouped imports in case single_import_per_statement is not enabled. This would remove the priority issue. Same with no_leading_import_slash.

This comment has been minimized.

Copy link
@JakeFr

JakeFr Aug 12, 2019

Author

Sadly NamespaceUsesAnalyzer skips group and multiple use

This comment has been minimized.

Copy link
@JakeFr

JakeFr Aug 12, 2019

Author

Add support for multiple use (not group) with an extra argument to avoid side effect

Show resolved Hide resolved src/Fixer/Import/NoUnneededAliasFixer.php Outdated
Show resolved Hide resolved src/Fixer/Import/NoUnneededAliasFixer.php Outdated

@JakeFr JakeFr changed the title Add NoUnneededAliasFixer Add NoUnneededImportAliasFixer Aug 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.