Bug report
Even when my phpstan.neon is excluding the file using excludePaths, the analyze command will throw a "child process error" if there is a PHP syntax error in that file. In my case, I have a file (Cache/Item.php) which supports psr/cache:1.0, so I want to ignore it from phpstan but still keep it to maintain backwards compatiblity.
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Child process error (exit code 255): PHP Fatal error: Declaration of Google\Auth\Cache\Item::getKey() must be compatible with Psr\Cache\CacheItemInterface::getKey(): string in
/Users/betterbrent/Code/google-auth-library-php/src/Cache/Item.php on line 62
Fatal error: Declaration of Google\Auth\Cache\Item::getKey() must be compatible with Psr\Cache\CacheItemInterface::getKey(): string in
/Users/betterbrent/Code/google-auth-library-php/src/Cache/Item.php on line 62
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is using the latest version (1.5.4), but it happens on 1.4 as well.
Code snippet that reproduces the problem
See the github actions result:
- On PHP 8.0, clone the repo
git clone git@github.com:googleapis/google-auth-library-php
cd google-auth-library-php
composer install
- Run PHPstan and see the error (using PHPstan 1.5.4, but I don't think it matters)
Expected output
I would expect it to succeed with "[OK] No errors"
Did PHPStan help you today? Did it make you happy in any way?
Yes, it's amazing!! I'm adding it to all my repos :)
Bug report
Even when my
phpstan.neonis excluding the file usingexcludePaths, theanalyzecommand will throw a "child process error" if there is a PHP syntax error in that file. In my case, I have a file (Cache/Item.php) which supportspsr/cache:1.0, so I want to ignore it fromphpstanbut still keep it to maintain backwards compatiblity.This is using the latest version (1.5.4), but it happens on 1.4 as well.
Code snippet that reproduces the problem
See the github actions result:
Expected output
I would expect it to succeed with "[OK] No errors"
Did PHPStan help you today? Did it make you happy in any way?
Yes, it's amazing!! I'm adding it to all my repos :)