Switch over to using hooks instead of implementing deprecated TestListener
localheinz opened this issue · 5 comments
To allow compatibility with phpunit/phpunit:^9.0.0
, for which the TestListener
interface will have been removed, an implementation using hooks need to be developed.
For reference, see
I took a stab at this earlier, but it appears there's a bit of a challenge as the hooks only receive the name of the test, rather than the TestCase
. That is, from the name of the test the test class and test need to be derived in order to introspect its annotations for determining whether the test is configured for a different threshold then the basic setting in phpunit.xml
.
@localheinz Thank you for these details.
Looks like we will need a new major release and core logic to support PHPUnit 9.0. That version is set for release in February 2020.
Any chance you still have your implementation attempt? If so could you push it as a branch to your fork? I'm curious to see it and could offer some ideas.
Instant upgrade path rectorphp/rector#1270
Looks like we will need a new major release and core logic to support PHPUnit 9.0. That version is set for release in February 2020.
That's not related. Hooks are actually supported since PHPUnit 7.1.