Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.3
-
Fix Version/s: 2.4
-
Component/s: Mapping Drivers
-
Labels:None
Description
As described in the documentation (http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#preflush) my pre-flush lifecycle callback is not receiving an instance of Doctrine\ORM\Event\PreFlushEventArgs when called in Doctrine\ORM\Mapping\ClassMetadataInfo::invokeLifecycleCallbacks().
Hi Kevin,
The current lifecycle event system does not allow access to the event args. :
http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#lifecycle-callbacks.
Now it is possible just by using the EventManager :
http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#listening-to-lifecycle-events
Just after
DDC-1955: (https://github.com/doctrine/doctrine2/pull/423) be merged it will be possible.Cheers