-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
refactor: remove @Deprecated methods #3184
Conversation
Not so many resources on automated removal of deprecated methods, a serious one is Drupal 9: Automated Deprecated Code Removal - A Proof of Concept |
ready to merge |
@@ -231,94 +228,6 @@ private boolean isTypePresentInStaticImports(String type, Collection<String> sta | |||
return imports; | |||
} | |||
|
|||
@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the whole class should be renamed since ImportScanner
does not exist anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I'm not really comfortable with removing those tests: shouldn't they be refactored?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right the rest if ImportScannerTest
has been moved to ImoprtTest
} | ||
|
||
@Test | ||
public void testremoveDeprecatedMethods() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better to put an ignore on the test, instead of commenting its content, wdyt?
I'm not in favor of Ignored tests, this usually results in maintenance and technical debt.
|
pushed changes |
fixed ci |
Well, I'm not a huge fan of commented code, which I find harder to find for maintenance: at least with ignores you're sure that the test is still compiling and you know it's there with the test result. Re the refactoring of tests, I didn't check those in the details so I trust you on this one, but I guess we should add a coverage threshold at a point :) |
Thanks!
|
Remove @deprecated methods and types.
Cool factor: I used Spoon in sniper mode for doing this, see method
removeDeprecatedMethods
. It worked, kudos to the sniper mode!.cvsignore
is removed because it crashes the sniper pretty-printer.