I updated my project to have yii 1.1.22 and added PHPUnit 9.3.11 using composer. I’m using PHP 7.4.
I had to add the compatibility.php file in protected/tests/ described here: https://github.com/yiisoft/yii/issues/4227
However, the phpunit class in vendor/phpunit/phpunit/src/Runner/Version.php is declared as final. So when executing the test (…/…/vendor/phpunit/phpunit/./phpunit), it shows:
PHP Fatal error: Class PHPUnit_Runner_Version may not inherit from final class
(PHPUnit\Runner\Version) in /var/www/2020/protected/tests/compatibility.php on line 18
As we cannot extend it.
Removing the final keyword from Version.php it’s the workaround for now but are there any plans to address this for a future version of 1.1? or any other way to solve this?
Opened ticket for this https://github.com/yiisoft/yii/issues/4319