[DDC-2186] PreFlushEventArgs not passed by ClassMetadataInfo::invokeLifecycleCallbacks() Created: 05/Dec/12  Updated: 02/Feb/13  Resolved: 02/Feb/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Mapping Drivers
Affects Version/s: 2.3
Fix Version/s: 2.4

Type: Improvement Priority: Major
Reporter: Kevin Herrera Assignee: Fabio B. Silva
Resolution: Fixed Votes: 0
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().



 Comments   
Comment by Fabio B. Silva [ 05/Dec/12 ]

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

Comment by Fabio B. Silva [ 13/Dec/12 ]

Change issue type, since it's not a bug.

Comment by Fabio B. Silva [ 02/Feb/13 ]

fixed : https://github.com/doctrine/doctrine2/commit/71a68a5c6fcd49538c3ef2f86d64bcde1958251c

Generated at Sun Nov 23 13:49:00 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.