You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix shouldUnionExistingItemType to use bidirectional supertype check
The original check only tested one direction ($newValue->isSuperTypeOf($existingValue)),
which triggered union for cases like += and ++ operations where the existing type was
already wider (e.g., 0|float vs float). This caused type degradation through loop
iterations, producing *ERROR* types in the shopware-connection-profiler test.
The bidirectional check skips union when either type is a supertype of the other,
only triggering for genuinely incompatible types (e.g., false -> true, 'foo' -> 'bar').
This fixes the shopware regression while preserving the core bug-8270 fix.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments