phpstan-src icon indicating copy to clipboard operation
phpstan-src copied to clipboard

Don't report already assigned errors when setting or unsetting an offset on array access objects set as class properties.

Open mad-briller opened this issue 3 months ago • 1 comments

fixes https://github.com/phpstan/phpstan/issues/13856

Took inspiration from https://github.com/phpstan/phpstan-src/pull/3817 when implementing the fix.

Not entirely 100% sure about the proposed changes here, as passing through the $originalNode to the PropertyWrite constructor feels a little heavy handed, considering i only need one of the 3 types that it could be, and also it has to be null because of the parent constructor case, so open to suggestions there.

mad-briller avatar Dec 03 '25 14:12 mad-briller

i have no intuition on how to deal with the escaped mutants mentioned by CI :angel:, if someone could give me a pointer that'd be appreciated

mad-briller avatar Dec 05 '25 11:12 mad-briller