Closed
Description
Description
PHPUnit 10 is around the corner (possibly released next month), and it contains a complete overhaul of its internals, particularly the new event system: sebastianbergmann/phpunit#4676
The new system also provides an easy way too hook into those events: https://github.com/sebastianbergmann/phpunit/blob/2a89c3c62c4d94fa92b72cb3693ca4fa057e4517/src/Event/Facade.php#L40
Among the events, there are even multiple dedicated to deprecations:
- triggered by
E_USER_DEPRECATED
: https://github.com/sebastianbergmann/phpunit/blob/main/src/Event/Events/Test/Issue/DeprecationTriggered.php - triggered by
E_DEPRECATED
: https://github.com/sebastianbergmann/phpunit/blob/main/src/Event/Events/Test/Issue/PhpDeprecationTriggered.php - triggered manually by PHPUnit itself: https://github.com/sebastianbergmann/phpunit/blob/main/src/Event/Events/Test/Issue/PhpunitDeprecationTriggered.php
This maybe warrants a discussion here on how to tackle this new release, and how to leverage all this new features.
Example
No response