You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
include OutputAwareTrait or IO in your phpunit test case which extends PHPUnit\Framework\TestCase
On running that particular will throw a php fatal error:
PHP Fatal error: Cannot override final method PHPUnit\Framework\TestCase::output() in /Project-Dir/vendor/consolidation/robo/src/Common/OutputAwareTrait.php on line 33
Expected behavior
Phpunit will run without php fatal error.
Actual behavior
PHP Fatal error: Cannot override final method PHPUnit\Framework\TestCase::output() in /Project-Dir/vendor/consolidation/robo/src/Common/OutputAwareTrait.php on line 33
System Configuration
PHP version: 8.2
PHPunit: 10.5.12
The text was updated successfully, but these errors were encountered:
This incompatibility is unfortunate, but as a workaround, you could clone OutputAwareTrait and make your own version in your own namespace, since this is just a utility trait.
Fixing this would break backwards compatibility, and therefore could not happen until Robo 5. I am unlikely to create a new major version just for this, and currently there is no scheduled timeframe for a new major version.
Steps to reproduce
include OutputAwareTrait or IO in your phpunit test case which extends PHPUnit\Framework\TestCase
On running that particular will throw a php fatal error:
PHP Fatal error: Cannot override final method PHPUnit\Framework\TestCase::output() in /Project-Dir/vendor/consolidation/robo/src/Common/OutputAwareTrait.php on line 33
Expected behavior
Phpunit will run without php fatal error.
Actual behavior
PHP Fatal error: Cannot override final method PHPUnit\Framework\TestCase::output() in /Project-Dir/vendor/consolidation/robo/src/Common/OutputAwareTrait.php on line 33
System Configuration
PHP version: 8.2
PHPunit: 10.5.12
The text was updated successfully, but these errors were encountered: