Closed
Description
Symfony version(s) affected: 4
Description
When installing Codeception in Symfony 4 with composer require "codeception/codeception" --dev
(as recommended at https://codeception.com/quickstart ), I'm getting this warning from composer:
Adding phpunit/phpunit as a dependency is discouraged in favor of Symfony's PHPUnit Bridge.
Plus this hint:
Instead:
1. Remove it now: composer remove --dev phpunit/phpunit
2. Use Symfony's bridge: composer require --dev phpunit
I already reported this as a possible Codeception issue, but received the answer that it's more a Symfony issue: Codeception/Codeception#4974
Activity
sinner commentedon May 18, 2018
I have the same problem but using Behat
nicolas-grekas commentedon May 18, 2018
We could solve this by allowing codeception/behat/etc. to be added on top of the phpunit that is built by the bridge.
This could be done by adding a SYMFONY_PHPUNIT_REQUIRE env var to configure the bridge (similar to SYMFONY_PHPUNIT_REMOVE).
Might need more thought to be made to work seamlessly with recipes.
zored commentedon Jun 7, 2018
I think we have a compatability problem here now because of
/bin/.phpunit/
and/vendor/
mix. Example:stof commentedon Jun 7, 2018
can you show the output of
composer show
so that we can see the versions of packages you have installed ?tonivdv commentedon Jun 12, 2018
I've got the exact same issue as @ThomasLandauer but with a different package. In my case I try to require https://github.com/martin-helmich/phpunit-json-assert which in their composer.json they have
When I do
composer require --dev helmich/phpunit-json-assert
in my sf4 project , I get the same as @ThomasLandauerBut it's only a warning as the tests work as expected.
Cheers
0xdfgp commentedon Jun 21, 2018
@stof Same problem here. This is my composer show output:
And the composer.json:
ghost commentedon Jun 22, 2018
Hi, we have the same problem here:
Here is the
composer show
output:And this is what we have in
composer.json
:Looking forward to some help on that topic.
nicolas-grekas commentedon Jun 23, 2018
You need to use the real phpunit script instead, which is at
./vendor/bin/phpunit
.xabbuh commentedon Jul 6, 2018
Is there anything we need to do here?
ostrolucky commentedon Jul 7, 2018
Well yes, this issue is about composer triggering the message when requiring libs relying on phpunit. @nicolas-grekas's comment solves different issue.
22 remaining items