-
I started a project and added PHP Fatal error: Trait "PHPUnit\Framework\TestListenerDefaultImplementation" not found in /app/vendor/symfony/phpunit-bridge/Legacy/SymfonyTestsListenerForV7.php on line 26 I can "bypass" this error by removing/commenting the listener in my |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I don’t really know how PHPUnit support has progressed but it seems you don’t need the listener since |
Beta Was this translation helpful? Give feedback.
-
The SymfonyTestsListener is for PHPUnit 9 and older. PHPUnit 10+ has a concept of extensions instead, which is supported in symfony/phpunit-bridge 7.2+ for the clock-mock, dns-mock and auto-covers features. The deprecation reporting has not been reimplemented in symfony/phpunit-bridge because PHPUnit 10+ has a native feature for it (in PHPUnit 10.x, it is not feature-equivalent to the bridge, which is why we recomment using PHPUnit 11+ when migrating, not 10.x). The documentation of the component is not yet updated for the support of those newer PHPUnit version. |
Beta Was this translation helpful? Give feedback.
-
Looking at the history, the xml file was generated for phpunit 9.6 and then modified when I updated to phpunit 12 (I don't remember modifying it myself though, so maybe a flex recipe ?) Thanks both of you for explanation ! |
Beta Was this translation helpful? Give feedback.
The SymfonyTestsListener is for PHPUnit 9 and older.
PHPUnit 10+ has a concept of extensions instead, which is supported in symfony/phpunit-bridge 7.2+ for the clock-mock, dns-mock and auto-covers features. The deprecation reporting has not been reimplemented in symfony/phpunit-bridge because PHPUnit 10+ has a native feature for it (in PHPUnit 10.x, it is not feature-equivalent to the bridge, which is why we recomment using PHPUnit 11+ when migrating, not 10.x).
The documentation of the component is not yet updated for the support of those newer PHPUnit version.