Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2186

PreFlushEventArgs not passed by ClassMetadataInfo::invokeLifecycleCallbacks()

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major 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().

        Activity

        Hide
        Fabio B. Silva added a comment -

        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

        Show
        Fabio B. Silva added a comment - 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
        Hide
        Fabio B. Silva added a comment -

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

        Show
        Fabio B. Silva added a comment - Change issue type, since it's not a bug.
        Show
        Fabio B. Silva added a comment - fixed : https://github.com/doctrine/doctrine2/commit/71a68a5c6fcd49538c3ef2f86d64bcde1958251c

          People

          • Assignee:
            Fabio B. Silva
            Reporter:
            Kevin Herrera
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: