Open unlikenesses opened 4 years ago
This is broken from SF 4.4, running a fresh install
10005 symfony new my_project_directory --version="4.4.*"
10006 cd my_project_directory
10010 composer require --dev phpunit/phpunit symfony/test-pack
10014 ./bin/phpunit
Gives error:
Fatal error: Uncaught Error: Call to undefined method PHPUnit\TextUI\TestRunner::doRun() in my_project_directory/bin/.phpunit/phpunit-8.5-0/src/TextUI/Command.php:235
Stack trace:
#0 my_project_directory/bin/.phpunit/phpunit-8.5-0/src/TextUI/Command.php(194): PHPUnit\TextUI\Command->run(Array, true)
#1 my_project_directory/bin/.phpunit/phpunit-8.5-0/phpunit(22): PHPUnit\TextUI\Command::main()
#2 my_project_directory/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php(465): include('/Users/tdecaux/...')
#3 my_project_directory/bin/phpunit(13): require('/Users/tdecaux/...')
#4 {main}
thrown in my_project_directory/bin/.phpunit/phpunit-8.5-0/src/TextUI/Command.php on line 235
@ebuildy You have this error without installing LiipFunctionalTestBundle?
Ho yeah totally unrelated, 😔
Le lun. 5 févr. 2024, 10:39, Alexis Lefebvre @.***> a écrit :
@ebuildy https://github.com/ebuildy You have this error without installing LiipFunctionalTestBundle?
— Reply to this email directly, view it on GitHub https://github.com/liip/LiipFunctionalTestBundle/issues/565#issuecomment-1927281127, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJJZ2LZPNJXPWNTX5UNLDDYSD4KDAVCNFSM4LEK7Z2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJSG4ZDQMJRGI3Q . You are receiving this because you were mentioned.Message ID: @.***>
Thanks for reporting it though, it gives an interesting insight on this error.
I can't find a call to doRun
in this bundle, so I don't get what is the root cause of this error.
Looks like symfony is doing some shit with their phpunit bridge , this drive me nuts
Le lun. 5 févr. 2024, 11:06, Alexis Lefebvre @.***> a écrit :
Thanks for reporting it though, it gives an interesting insight on this error.
I can't find a call to doRun in this bundle, so I don't get what is the root cause of this error.
— Reply to this email directly, view it on GitHub https://github.com/liip/LiipFunctionalTestBundle/issues/565#issuecomment-1927337791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJJZ2KHJWE2DKH5EDVND7LYSD7QLAVCNFSM4LEK7Z2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJSG4ZTGNZXHEYQ . You are receiving this because you were mentioned.Message ID: @.***>
OK got it!
In Symfony documentation, for 4.4 at https://symfony.com/doc/4.x/testing.html, they said:
composer require --dev phpunit/phpunit symfony/test-pack
But symfony bridge is using another version of phpunit, tuned by Symfony. So you dont need to install phpunit. composer remove phpunit/phpunit
did the trick, no more mess between 2 phpunit versions
But your library requires phpunit, which is not compatible with symfony-phpunit bridge concept :-/
Please post your composer.lock content here so I could help
Preconditions
.env.test
looks like this:and the
test.sqlite
database has been created and has the correct schema.Steps to reproduce
After installing the bundle and running
./bin/phpunit
, I get this error:EDIT:
It works if you run
./vendor/bin/phpunit
. So apparently it doesn't work with the bridge version.