Reputation: 5536
I have a fresh symfony project and I need to install phpunit, so I run composer require --dev symfony/phpunit-bridge
to install it. It creating symlink to phpunit executable in bin/ folder. But when I'm running tests using bin/phpuinit tests/
command I'm getting message "No composer.json found in the current directory, showing available packages from packagist.org
" and it starting phpunit installation into bin directory and at the end I have bin/.phpunit folder and all the phpunit related files there. Why it installing php unit there and not into vendor, why it's not see composer??? what I'm doing wrong ? Thanks in advance!
Upvotes: 1
Views: 1522
Reputation: 1893
What you are using is the symfony/phpunit-bridge
It basically is way more flexible than just phpunit in the vendor folder, allowing to adapt to multiple versions of PHPUnit based on your environment.
Please read the documentation linked above for more details. You're not doing anything wrong!
Another way would be a plain composer require phpunit/phpunit
, which would work the "basic"/"standard" way.
Upvotes: 4