mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #12066] fix: handle DateTime, arrays, and nulls properly in value comparison #13452
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/12066
State: closed
Merged: No
Patch Summary
This patch improves the value comparison logic in Doctrine’s
UnitOfWorkclass during change detection.Key Changes
Introduces a private method
valuesAreEqual()that compares values with special handling for:nullvalues,DateTimeInterfaceinstances using the spaceship operator (<=>),===) for other types.Replaces existing strict equality checks with
valuesAreEqual()to prevent false positives.Benefit
Enhances reliability in detecting changes for entities with
DateTimeand array fields.