how should you run phpstan? #474
Unanswered
mscurtescu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
After a
composer install
I tried running phpstan in two different ways:vendor/bin/phpstan analyze
grunt shell:phpstan
With both I am getting over 150 errors, for example:
As far as I can tell core WordPress functions like
admin_url
,site_url
andadd_filter
are not recognised.I checked and
composer
did download:vendor/php-stubs/wordpress-stubs
vendor/szepeviktor/phpstan-wordpress
wordpress
Are all 3 needed? In what order are they loaded?
The level set in
phpstan.neon.dist
is 5, all these errors show up starting with level 1, only level 0 makes them go away.Anything else that I might be missing?
Beta Was this translation helpful? Give feedback.
All reactions