Closed koftikes closed 3 years ago
Same here. Weird!
Got the same error. Haven't found any solution yet.
This shit is still happening. Any fixes?!
I have the same problem, I need install phpunit manually and ignore the warning otherwise phpunit does not install.
The same here.
If you run php bin/phpunit all the PHPUnit classes will install. Easy workaround.
If you run php bin/phpunit all the PHPUnit classes will install. Easy workaround.
Nothing works for me,
Try to create a phpstan.neon
file in your project dir root and define the phpunit autoload file
# phpstan.neon
parameters:
autoload_files:
- bin/.phpunit/phpunit-7.5/vendor/autoload.php
If you run php bin/phpunit all the PHPUnit classes will install. Easy workaround.
worked for me too
Me too Thank you
For me it was composer require phpunit/phpunit
😅
I'm just writing my first test on my first pure Symfony app, and I just couldn't find this file. You should probably be able to write a test when getting started with a framework without going to StackOverflow and a github issues page. Putting a neon file in with the version seems like a bit of a maintenance issue. Running phpunit seems hacky. Anyway will do, but think it would be good to come up with a better solution.
When I use Symfony 4.1 and PhpStan 0.10 In case: Adding phpunit/phpunit as a dependency is discouraged in favor of Symfony's PHPUnit Bridge.
Instead: Remove it now: composer remove --dev phpunit/phpunit Use Symfony's bridge: composer require --dev phpunit i got next erors: Class PHPUnit\Framework\TestCase not found and could not be autoloaded. Class PHPUnit\Framework\TestCase was not found while trying to analyse it - autoloading is probably not configured properly. This hapens becouse phpunit not install before run a tests. you also can see next topic in PhpStan repo