mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Optionally detect changes in PHP objects by value, not reference #6949
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?
Originally created by @michnovka on GitHub (Mar 11, 2022).
Feature Request
After reading docs about DateTime object in Doctrine, I got an idea for an improvement.
Lets allow objects to be compared by value for custom types
Summary
My idea is to provide interface
When evaluating changed columns in
UnitOfWork, we could do:This would allow e.g. to define custom
DateTimetype which would implement this interface and company by unix timestamp. Thus updating the instance ofDateTimedirectly WOULD have an effect.