Yii 1.1.x Is Not Compatible With Phpunit 4.x ?

Hi.

During building a CI server for my Yii application, I maybe found a compatibility issue.

I found that the verions of phpunit is 4.0.7 and that version of PHPUnit does not have "[size=2]PHPUnit/Runner/Version.php". [/size]

[size=2]which is refered from CTestCase of Yii 1.1.14.[/size]

[size=2]

[/size]

[size=2]that causes php error.[/size]

[size=2]

[/size]

[size=2]

[/size]

Yii 1.1.x is not perfectly compatible with Phpunit 4.x

While waiting for a clean and definitive solution provided by Yii development team, I commented these lines in my CTestCase.php:


//require_once('PHPUnit/Runner/Version.php');

//require_once('PHPUnit/Util/Filesystem.php'); // workaround for PHPUnit <= 3.6.11


spl_autoload_unregister(array('YiiBase','autoload'));

//require_once('PHPUnit/Autoload.php');

spl_autoload_register(array('YiiBase','autoload')); // put yii's autoloader at the end



It’s just a quick and dirty workaround…

I found that this issue was already reported on Yii Issue tracker (I can’t post here the link, because the forum security policy doesn’t allow me to write a link…)

The current version of CTestCase.php on GitHub Yii repository has been modified to solve problems with Phpunit 3.8+

Look at the Yii repository.

Best Regards

Massimo