Неустранимая ошибка Doctrine 3.0.2 при сбросе PreUpdate должна иметь тип LifecycleEventArgs, задан PreUpdateEventArgs.Php

Кемеровские программисты php общаются здесь
Гость
Неустранимая ошибка Doctrine 3.0.2 при сбросе PreUpdate должна иметь тип LifecycleEventArgs, задан PreUpdateEventArgs.

Сообщение Гость »


I just updated Doctrine to the last version 3.0.2 and when I try to do a simple flush:

global $entityManager; $entity = $this->getRepository()->findByUID($uid); if(!$entity) { $entity = parent::createNewEntity(); $entity->setUid($uid); } $entity->setSuperHashDate($dateTime); $entity->setSalt($salt); $entity->setSuperHash($superHash); $entityManager->flush(); It returns the following error:

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: DoctrineEventSubscriber::preUpdate(): Argument #1 ($args) must be of type Doctrine\ORM\Event\LifecycleEventArgs, Doctrine\ORM\Event\PreUpdateEventArgs given, called in /home/framework/public_html/app/_core/libs/vendor/doctrine/event-manager/src/EventManager.php on line 41 and defined in /home/framework/public_html/app/_core/events/subscribers/DoctrineEventSubscriber.php:23 Stack trace:

#0 /app/libs/vendor/doctrine/event-manager/src/EventManager.php(41): DoctrineEventSubscriber->preUpdate()

#1 /app/libs/vendor/doctrine/orm/src/Event/ListenersInvoker.php(95): Doctrine\Common\EventManager->dispatchEvent()

#2 /app/libs/vendor/doctrine/orm/src/UnitOfWork.php(1120): Doctrine\ORM\Event\ListenersInvoker->invoke()

#3 /app/libs/vendor/doctrine/orm/src/UnitOfWork.php(404): Doctrine\ORM\UnitOfWork->executeUpdates()


Источник: https://stackoverflow.com/questions/780 ... eeventargs

Вернуться в «Php»