I have such listener
use Doctrine\Common\EventSubscriber;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Doctrine\Common\Persistence\Event\PreUpdateEventArgs;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\Events;
class MachineSubscriber implements EventSubscriber
and method
/**
* @param PreUpdateEventArgs $args
*/
public function preUpdate(PreUpdateEventArgs $args)
and Doctrine throw Exception
ContextErrorException: Catchable Fatal Error: Argument 1 passed to Certificate\MachineBundle\Event\MachineSubscriber::preUpdate() must be an instance of Doctrine\Common\Persistence\Event\PreUpdateEventArgs, instance of Doctrine\ORM\Event\PreUpdateEventArgs given,
Its strange becouse I use proper class.