[FIX] dynamic variable undefined inside `isset`
Fix https://github.com/phpstan/phpstan/issues/13353 This is the fix for the issue above. If you see any changes to make, please let me know; this is my first contribution to the project.
Please look at this problem more thoroughly. There's IssetCheck (
https://github.com/phpstan/phpstan-src/blob/5a3990227e64a66b058a96753887e4aa7d411b92/src/Rules/IssetCheck.php#L45
) used by several rules where only Variable with string name property is being handled, but the code might find some improvements to the logic useful.
It was my first idea to fix the problem in the IssetCheck, however, the error being returned actually comes from DefinedVariableRule. Being new to the project, I don't yet understand how it all works. However, if you could tell me a little more about what you'd like to see added, there's no problem; I'm open to any suggestions. I've added the tests as requested.
IssetCheck is used by IssetRule and others. Look at IssetRuleTest what it detects.
You should be able to produce some tests with $$ to see what's currently wrong about the behaviour.
IssetCheck is used by IssetRule and others. Look at IssetRuleTest what it detects.
You should be able to produce some tests with
$$to see what's currently wrong about the behaviour.
As you can see, I added the tests in IssetRuleTest.php, but nothing is thrown. Maybe I missed something, feel free to let me know.
The branch has conflict @ga-devfront ; are you interested in rebasing/finishing the PR ?
The branch has conflict @ga-devfront ; are you interested in rebasing/finishing the PR ?
Rebase done. But don't know what to do more for finishing it.
@ondrejmirtes up please :heart: