larastan: Larastan crashing PHPStan on PHP 8.1
- Larastan Version: 1.0.1
- PHPStan version: 1.1.2
--levelused: 5
Description
With php 8.0
PHP 8.0.12 (cli) (built: Oct 21 2021 14:38:26) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.12, Copyright (c) Zend Technologies
with Xdebug v3.1.1, Copyright (c) 2002-2021, by Derick Rethans
with Zend OPcache v8.0.12, Copyright (c), by Zend Technologies
➜ mother git:(trev-projector) ✗ vendor/bin/phpstan analyze
Note: Using configuration file /Users/andrew/PS/Code/mother/phpstan.neon.
275/275 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
With php 8.1
PHP 8.1.0RC5-dev (cli) (built: Oct 21 2021 06:23:20) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0-dev, Copyright (c) Zend Technologies
with Xdebug v3.1.1, Copyright (c) 2002-2021, by Derick Rethans
with Zend OPcache v8.1.0RC5-dev, Copyright (c), by Zend Technologies
➜ mother git:(trev-projector) ✗ vendor/bin/phpstan analyze
Note: Using configuration file /Users/andrew/PS/Code/mother/phpstan.neon.
275/275 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
-- ----------------------------------------------
Error
-- ----------------------------------------------
Some parallel worker jobs have not finished.
-- ----------------------------------------------
[ERROR] Found 1 error
If I enable debug mode on phpstan, I get the following
➜ mother git:(trev-projector) ✗ vendor/bin/phpstan analyze --no-progress --debug
Note: Using configuration file /Users/andrew/PS/Code/mother/phpstan.neon.
/Users/andrew/PS/Code/mother/app/Mixins/FindByHashIdMixin.php
I’m fully aware that this is not enough detail to diagnose the problem, but I’m asking for help collecting whatever you need.
However, removing/excluding that file just then repeats the problem for another file.
I’ve tried changing the level, which made no difference, and I’ve tried lengthening the parallel.processTimeout parameter - again with no change.
But, if I remove the larastan include from phpstan.neon, phpstan runs to completion - albeit with a pile of errors it now finds because of laravel’s magic.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 16 (1 by maintainers)
Updated PHP 8.1 to the overnight (from homebrew using shimamathur/php@8.1) - note the build date
phpstan now working as expected! Thanks for the help everyone
I think it might be this: https://bugs.php.net/bug.php?id=81630 (fixed today, try to build the latest PHP commit)
Otherwise there is very little information. It’d be nice to configure your error handler (display errors?) so that we can see more.
I had the same problem with this one.
I agree with @andycowan so I just updated my php8.1 from
PHP 8.1.0RC5-devtoPHP 8.1.0-dev