lib/EventDispatchingAgent.php
public function persist($object)
    {
        $this->dispatch(Events::PRE_PERSIST, $object);
        $this->agent->persist($object);
        $this->dispatch(Events::POST_PERSIST, $object);
    }
public function persist($object)
    {
        $this->dispatch(Events::PRE_PERSIST, $object);
        $this->agent->persist($object);
        $this->dispatch(Events::POST_PERSIST, $object);
    }
{@inheritdoc}