mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #1532] [DDC-3944] Add removeLifecycleCallback method in ClassMetadataInfo.php #9587
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/1532
State: closed
Merged: No
Ability to remove a lifecycle callback.
This is useful in order to disable a callback method on specific case.
Example with TimeStampable and updateTimestamps callback method:
When a user connect to the website, some attributes get updated automatically like last_logged_time...etc.
The object will see it's updated_at changed which is correct from the object point of view.
But it is not correct from the functional point of view, because none updated that user object.
Example of a method that update the object but the updated_at update is not desired:
So in this particular situation, there will be no date time updating in updated_at.