Description of problem: PHPUnit "--list-groups" fails Version-Release number of selected component (if applicable): php-phpunit-PHPUnit-3.7.34-1.fc20.noarch How reproducible: Run "phpunit --list-groups" Steps to Reproduce: 1. Change into an already setup PHP project directory (i.e. "phpunit" itself runs fine) 2. Run "phpunit --list-groups" Actual results: PHP Fatal error: Call to undefined method PHPUnit_TextUI_TestRunner::printVersionString() in /usr/share/pear/PHPUnit/TextUI/Command.php on line 154 PHP Stack trace: PHP 1. {main}() /usr/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46 PHP 3. PHPUnit_TextUI_Command->run() /usr/share/pear/PHPUnit/TextUI/Command.php:129 Expected results: A list of PHPUnit groups Additional info: Runs fine when using a composer-installed phpunit.
This seems to happen in a composer project, where PHPUnit is also installed. In this case you have to use vendor/bin/phpunit As "vendor/autoload.php" have priority on PHPUnit autoloader, I don't think we can fix this bug.
Can you please confirm if this anser is ok for you; so I can close this bug as "CANTFIX" ?
(In reply to Remi Collet from comment #1) > This seems to happen in a composer project, where PHPUnit is also installed. > > In this case you have to use vendor/bin/phpunit > > As "vendor/autoload.php" have priority on PHPUnit autoloader, I don't think > we can fix this bug. (In reply to Remi Collet from comment #2) > Can you please confirm if this anser is ok for you; so I can close this bug > as "CANTFIX" ? Sorry, yeah, it's only when a composer project "require-dev"s phpunit. Yes, I'm OK for you to close this as won't fix.
I reopen this bug as it seems the issue raise again. See: https://github.com/sebastianbergmann/phpunit/issues/1724 I plan to add a check in the launcher and switch to composer installed version if detected. Ex: from gitter clone Without se fix $ phpunit PHPUnit 4.1.0 by Sebastian Bergmann. Configuration read from /work/GIT/gitter/phpunit.xml.dist . Fatal error: Call to undefined method Gitter\Tests\ClientTest::hasExpectationOnOutput() in /usr/share/php/PHPUnit/TextUI/ResultPrinter.php on line 511 With the fix $ phpunit ==== Redirecting to composer installed version in vendor/phpunit ==== PHPUnit 4.1.0 by Sebastian Bergmann. Configuration read from /work/GIT/gitter/phpunit.xml.dist ................................................ Time: 690 ms, Memory: 9.75Mb OK (48 tests, 284 assertions)
php-phpunit-PHPUnit-4.6.7-2.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/php-phpunit-PHPUnit-4.6.7-2.fc22
php-phpunit-PHPUnit-4.6.7-2.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/php-phpunit-PHPUnit-4.6.7-2.fc21
php-phpunit-PHPUnit-4.6.7-2.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/php-phpunit-PHPUnit-4.6.7-2.el7
Package php-phpunit-PHPUnit-4.6.7-2.el7: * should fix your issue, * was pushed to the Fedora EPEL 7 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing php-phpunit-PHPUnit-4.6.7-2.el7' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6396/php-phpunit-PHPUnit-4.6.7-2.el7 then log in and leave karma (feedback).
php-phpunit-PHPUnit-4.6.10-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
php-phpunit-PHPUnit-4.6.10-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
php-phpunit-PHPUnit-4.6.10-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.