[PR #1410] Skip generate lifecycle methods if they already generated #9469

Closed
opened 2026-01-22 16:04:24 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1410

State: closed
Merged: No


This happens when I use one lifecycle method in prePersist and preUpdate together. Like

    lifecycleCallbacks:
        prePersist: [setCreatedAtValue, setUpdatedAtValue]
        preUpdate: [setUpdatedAtValue]

Generator generate two methods with the same names.

@Ocramius, what do you think what is better way to write test for this?
Should I test generateEntityLifecycleCallbackMethods directly?

**Original Pull Request:** https://github.com/doctrine/orm/pull/1410 **State:** closed **Merged:** No --- This happens when I use one lifecycle method in prePersist and preUpdate together. Like ``` yml lifecycleCallbacks: prePersist: [setCreatedAtValue, setUpdatedAtValue] preUpdate: [setUpdatedAtValue] ``` Generator generate two methods with the same names. @Ocramius, what do you think what is better way to write test for this? Should I test generateEntityLifecycleCallbackMethods directly?
admin added the pull-request label 2026-01-22 16:04:24 +01:00
admin closed this issue 2026-01-22 16:04:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9469