One assumption we often make about immutability is that an immutable object's methods will always return the same value when called with the same arguments, and that's a great thing to have, but with current immutability rules, referenced objects aren't forced to be immutable, so they could change.
See also #7438, #7629, #6881, etc. I think at some point we need to overhaul our immutability implementation and provide better support for different levels of immutability.
https://psalm.dev/r/a8e457deb1
One assumption we often make about immutability is that an immutable object's methods will always return the same value when called with the same arguments, and that's a great thing to have, but with current immutability rules, referenced objects aren't forced to be immutable, so they could change.
See also #7438, #7629, #6881, etc. I think at some point we need to overhaul our immutability implementation and provide better support for different levels of immutability.