I was following Tom McFarlin's directions for PHPStan found here:
https://tommcfarlin.com/better-wordpress-code-4/
This worked. But he referenced your extensions for PHPStan so I tried adding them following your directions:
https://packagist.org/packages/szepeviktor/phpstan-wordpress
Here is my composer.json file (.txt appended to get Github to allow upload):
composer.json.txt
And here is my phpstan.neon.dist file (same w/txt appended)
phpstan.neon.dist.txt
The folder structure for the plugin is:
wp-content\plugins\test
\src
\vendor
composer.json
composer.lock
phpstan.neon.dist
sample-plugin.php
When I run composer update everything seems to run fine. Then I try:
vendor/bin/phpstan analyse src
And get back an error:
Note: Using configuration file /var/www/phpdev.davemackey.net/wp-content/plugins/test/phpstan.neon.dist. File 'phar://phpstan.phar/conf/bleedingEdge.neon' is missing or is not readable.
Any suggestions are appreciated. :)
I was following Tom McFarlin's directions for PHPStan found here:
https://tommcfarlin.com/better-wordpress-code-4/
This worked. But he referenced your extensions for PHPStan so I tried adding them following your directions:
https://packagist.org/packages/szepeviktor/phpstan-wordpress
Here is my composer.json file (.txt appended to get Github to allow upload):
composer.json.txt
And here is my phpstan.neon.dist file (same w/txt appended)
phpstan.neon.dist.txt
The folder structure for the plugin is:
wp-content\plugins\test
\src
\vendor
composer.json
composer.lock
phpstan.neon.dist
sample-plugin.php
When I run composer update everything seems to run fine. Then I try:
vendor/bin/phpstan analyse srcAnd get back an error:
Note: Using configuration file /var/www/phpdev.davemackey.net/wp-content/plugins/test/phpstan.neon.dist. File 'phar://phpstan.phar/conf/bleedingEdge.neon' is missing or is not readable.Any suggestions are appreciated. :)