DDC-3739: [GH-1410] Skip generate lifecycle methods if they already generated #4587

Closed
opened 2026-01-22 14:45:29 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (May 15, 2015).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of aivus:

Url: https://github.com/doctrine/doctrine2/pull/1410

Message:

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

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

Before 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?

Originally created by @doctrinebot on GitHub (May 15, 2015). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of aivus: Url: https://github.com/doctrine/doctrine2/pull/1410 Message: This happens when I use one lifecycle method in prePersist and preUpdate together. Like ``` yml lifecycleCallbacks: prePersist: [setCreatedAtValue, setUpdatedAtValue] preUpdate: [setUpdatedAtValue] ``` Before 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 Bug label 2026-01-22 14:45:29 +01:00
admin closed this issue 2026-01-22 14:45:30 +01:00
Author
Owner

@aivus commented on GitHub (Dec 14, 2015):

Hi, @beberlei
Can you review #1410 ?

@aivus commented on GitHub (Dec 14, 2015): Hi, @beberlei Can you review #1410 ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4587