Created attachment 361770 [details] build.xml sample to test PHPUnit integration. Hi, I've got a build.xml containing a PHPUnit task. After updating phpunit, which use PHAR for now, the task breaks PHPUnit execution: BUILD FAILED Error reading project file [wrapped: build.xml:373:34: PHPUnitTask requires PHPUnit to be installed] Note: $ qlist phpunit /usr/share/php/phpunit/phpunit.phar /usr/bin/phpunit If, to the file /usr/share/php/phing/tasks/ext/phpunit/PHPUnitTask.php, I add include 'phpunit/phpunit.phar'; the class, PHPUnit_Runner_Version is found and no BuildException is raised, but phpunit.phar is run, so phing stops. If I add, set_include_path('phar:///usr/share/php/phpunit/phpunit.phar' . PATH_SEPARATOR . get_include_path()); Phing fails with [PHP Error] require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory [line 22 of /usr/share/php/phing/tasks/ext/phpunit/PHPUnitTestRunner.php] as phpunit.phar does not contain this file. Thanks
I've tested this with the 2.6.1 version I just added to the tree and was able to use phpunit just fine. Can you reproduce with the new version?
Hi, I still have the same problem: $ wget "https://489244.bugs.gentoo.org/attachment.cgi?id=361770" -O build.xml $ phing -l Buildfile: build.xml [PHP Error] require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory [line 22 of /usr/share/php/phing/tasks/ext/phpunit/PHPUnitTestRunner.php] PHP Fatal error: require_once(): Failed opening required 'PHPUnit/Autoload.php' (include_path='phar:///usr/share/php/phpunit/phpunit.phar:/usr/share/php/../classes:.:/usr/share/php5:/usr/share/php') in /usr/share/php/phing/tasks/ext/phpunit/PHPUnitTestRunner.php on line 22 Fatal error: require_once(): Failed opening required 'PHPUnit/Autoload.php' (include_path='phar:///usr/share/php/phpunit/phpunit.phar:/usr/share/php/../classes:.:/usr/share/php5:/usr/share/php') in /usr/share/php/phing/tasks/ext/phpunit/PHPUnitTestRunner.php on line 22 $ emerge --info dev-php/phpunit dev-php/phing [..] dev-php/phpunit-3.7.20 was built with the following: USE="" dev-php/phing-2.6.1 was built with the following: USE="minimal (multilib)" ABI_X86="64" I've tried after emerging phing with USE="-minimal" : $ phing -l Buildfile: build.xml BUILD FAILED Error reading project file [wrapped: build.xml:5:34: PHPUnitTask requires PHPUnit to be installed] Total time: 0.0682 seconds
I have same problem. phing-2.6.1 phpunit-3.7.20
Just added dev-php/phing-2.8.2 which works with the phpunit phar file. You will need to add a pharlocation attribute for it to work.