You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting from version 1.10.22 (no issue in 1.10.21 and below) a weird problem started to appear in one of our projects.
It takes forever to finish static analysis in a PHP file containing a match expression where a single match arm consists of many conditional expressions.
Sharing a snippet from the playground is not possible because of the error. So I created a gist instead.
I am using the following command prompt to perform the static analysis:
Did PHPStan help you today? Did it make you happy in any way?
Yes, every day!
The text was updated successfully, but these errors were encountered:
yarimadam
changed the title
Match arm with many conditional expression takes forever to finish analysis starting from 1.10.22
Match arm with many conditional expression causes static analysis forever to finish, starting from 1.10.22
Jul 24, 2023
Bug report
Hello!
Starting from version 1.10.22 (no issue in 1.10.21 and below) a weird problem started to appear in one of our projects.
It takes forever to finish static analysis in a PHP file containing a match expression where a single match arm consists of many conditional expressions.
Sharing a snippet from the playground is not possible because of the error. So I created a gist instead.
I am using the following command prompt to perform the static analysis:
./vendor/bin/phpstan analyse --level 3 --memory-limit=2G phpstan_analysis_bug.php
Code snippet that reproduces the problem
https://gist.github.com/yarimadam/1e4cb2fd27cc9a63d2a18a057ba0f3b6
Expected output
The static analysis would finish quickly.
Did PHPStan help you today? Did it make you happy in any way?
Yes, every day!
The text was updated successfully, but these errors were encountered: