je comme auditeurSymfony2: abonné Doctrine lance ContextErrorException - doit être une instance de Doctrine Common persistance Event PreUpdateEventArgs
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
et méthode
/**
* @param PreUpdateEventArgs $args
*/
public function preUpdate(PreUpdateEventArgs $args)
et Doctrine jet 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,
Son étrange parce que j'utilise la bonne classe.