PHPUnit 6 no longer supports PHPUnit_Framework_TestCase as the base class for test case classes and requires the use of PHPUnit\Framework\TestCase instead.
PHPUnit\Framework\TestCase can be used as the base class for test case classes since PHPUnit 5.4.
I think a fixer would be useful that migrates PHPUnit test case classes from PHPUnit_Framework_TestCase to PHPUnit\Framework\TestCase.
Nice, maybe we can have a fixer for the setExpectedException deprecation case as well?
I think those should be separated rules.
@sebastianbergmann , you are more than welcome to send a PR with that new feature !
As much as I would like to implement this myself and provide a pull request, I unfortunately lack the time to do so. Sorry.
Notice that #2381 introduced the use of deprecated setExpectedException
not related
@keradus, what is the closest fixer to start from? I.e. some fixer able to find & replace class name occurrences. I'm thinking of UnusedUsesand other fixers related to imports.
Should the PHPUnit_Framework_TestCase to PHPUnit\Framework\TestCase fixer change both inheritance and PHPDocs or they are usually implemented as separate fixers?
I don't recall that we have replace for classes somewhere. you could take a look at logic from alias functions fixer.
IMO, same fixer for code+docs, as changing code without docs will generate issues for users
@keradus, thanks, will take a look into it.
How can I start WiP on this issue and what is expected ETA to complete implementation usually?
I've looked into https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/CONTRIBUTING.md and https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/COOKBOOK-FIXERS.md for the first time and will try to follow instructions but didn't read carefully yet, sorry if they contain answers to these.
just create a new PR marking it with WIP in title. no ETA is expected, but if it would be open too long without any movements inside it could be closed during cleanup.
Ok, thanks, just didn't want to overlap if somebody is already working to embody this fixer into life.