Problem/Motivation
In general, having an unused use statement in a class or file doesn't have any impact on the code; it simply provides an alias that ends up not being used. However, this is slightly bad for developer experience, since it suggests to the developer that there is a dependency when there actually isn't. Use statement changes also create unneeded merge conflicts that git can't resolve generally.
Proposed resolution
Remove all the unused use statements in a single patch.
Remaining tasks
Create a single patch that removes all unused use statements from core. The patch should be created and committed during the RC phase to make the cleanup while minimizing disruption.
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#5 | 2533800-5.patch | 309.25 KB | alexpott |
#5 | 4-5-interdiff.txt | 8.29 KB | alexpott |
#4 | 2533800-4.patch | 300.96 KB | alexpott |
Comments
Comment #1
dawehnerFor reference https://www.jetbrains.com/phpstorm/help/optimizing-imports.html will help to file the patch.
Comment #2
mgiffordComment #3
darrenwh CreditAttribution: darrenwh as a volunteer and at Investis Digital commentedHi,
I use Netbeans and there is inbuilt functionality to do this https://blogs.oracle.com/netbeansphp/entry/how_to_fix_your_use
D
Comment #4
alexpottPreparing this patch so it can go in first thing after the RC 1 release. 564 files changed, 3 insertions(+), 877 deletions(-) :D
Comment #5
alexpottMissed a few.
PHPStorm can now not find a single missing use statement.
Comment #6
cosmicdreams CreditAttribution: cosmicdreams as a volunteer commentedWow, it's great that we have all these tests right? That's a lot of files that are being touched. I downloaded the patch and searched for more use statements to remove and couldn't find any.
RTBC from me.
Comment #7
catchCommitted/pushed to 8.0.x, thanks!