Fix ArrayAccess destructuring assignment producing mixed.
Fixes https://github.com/phpstan/phpstan/issues/9456
You've opened the pull request against the latest branch 1.11.x. If your code is relevant on 1.10.x and you want it to be released sooner, please rebase your pull request and change its target to 1.10.x.
It appears changing the order of these operations breaks analysis of PrestaShop here: https://github.com/PrestaShop/PrestaShop/blob/develop/classes/LocalizationPack.php#L495
I can't seem to recreate an *ERROR* type from the $attributes['install'] == 1 expression in a NodeScopeResolver test or a Rule test for InvalidComparisonOperationRule, and (SimpleXMLElement|null) isn't instanceof ArrayAccess so i can't see how it would be affected anyway.
what's interesting is 2 lines above the expression is an offset access to the $attributes value which isn't reported as an issue.
not sure how to proceed; i've added a second commit which shows the rule test for the operation that i tried to recreate, a little advice or direction would be a big help, thanks