Closed ondrejmirtes closed 11 months ago
Oh shoot, wow, I was thiiis close :-) Thanks a lot!
I feel very bad now, because I actually load the files that are required for tests here
https://github.com/spaze/phpstan-disallowed-calls/blob/f0a6f698e6bd3535423fca1807fa78f91c206af3/tests/bootstrap.php#L4-L7
and even have a test that checks that all files from the lib
dir are loaded in bootstrap.php
https://github.com/spaze/phpstan-disallowed-calls/blob/f0a6f698e6bd3535423fca1807fa78f91c206af3/tests/BootstrapTest.php#L26
but it's been proved useless now 😅 The classmap
seems better.
Thanks again 🍻
I've added the composer.json
change to #227 and the rest is in #225.
This is a response to: https://github.com/phpstan/phpstan/discussions/10268
To me it seemed you were everything correctly, so I checked it out. PHPStan needs to find the classes you're using in tests, which usually isn't a problem because they're simply in analysed paths, but the reflection in tests needs some extra help discovering them. I usually do that by adding
tests
directory intoclassmap
inautoload-dev
.Now the output is: