Bug report
Since updating to PHPStan 2.2.6 there seem to be some issues with type inference of docblocks.
e
In one run of phpstan it seems to completely ignore the docblocks
e.g.
/**
* @var string
*/
protected $_code = 'test';
Property $_code has no type specified.
Then the next run it's completely fine and it validates the file without issue.
EDIT: This seems to be caused by Turbo since PHPSTAN_TURBO=0 phpstan analyse does run as expected
Code snippet that reproduces the problem
No response
Expected output
I would expect the phpstan output to be consistent, and to respect the values entered as docbloc.
In the example in my bug report i fixed the complaint, downgraded to 2.2.5 where it ran fine. Upgraded back up to 2.2.7 and then it was fixed there as well. This was due to result caching.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is an invaluable part of my workflow, paired with Rector i don't mind fixing the issues it flags leaving my installations much more stable than ever before!
Bug report
Since updating to PHPStan 2.2.6 there seem to be some issues with type inference of docblocks.
e
In one run of phpstan it seems to completely ignore the docblocks
e.g.
Then the next run it's completely fine and it validates the file without issue.
EDIT: This seems to be caused by Turbo since
PHPSTAN_TURBO=0 phpstan analysedoes run as expectedCode snippet that reproduces the problem
No response
Expected output
I would expect the phpstan output to be consistent, and to respect the values entered as docbloc.
In the example in my bug report i fixed the complaint, downgraded to 2.2.5 where it ran fine. Upgraded back up to 2.2.7 and then it was fixed there as well.This was due to result caching.Did PHPStan help you today? Did it make you happy in any way?
PHPStan is an invaluable part of my workflow, paired with Rector i don't mind fixing the issues it flags leaving my installations much more stable than ever before!