-
-
Notifications
You must be signed in to change notification settings - Fork 946
Open
phpstan/phpstan-src
#3899Labels
Description
Bug report
This is a most unwelcome development with PhpStan 1.12.0. Our code has many examples like the issue below, where a capturing group must exist if a capturing group in which it is defined exists. In our example, matches[3] is tested for existence with isset, and, since it does exist, matches[4] and matches[5] must also exist. I would be satisfied if the offending new check were removed, but, if not, then further analysis is required to check if nested groups must exist.
Code snippet that reproduces the problem
https://phpstan.org/r/10819497-432a-41c9-91c4-9c4ef8d53d5f
Expected output
No errors should be detected in the code.
Did PHPStan help you today? Did it make you happy in any way?
I am a little frustrated with it today. But I am normally extremely pleased with it.
Reactions are currently unavailable