Fix Lifecycle Callbacks
Remove a bit of code that breaks lifecycle callbacks of parent MappedSuperclasses
This commit is contained in:
parent
93c1106735
commit
db31c58102
@ -469,10 +469,6 @@ class AnnotationDriver extends AbstractAnnotationDriver
|
|||||||
if (isset($classAnnotations['Doctrine\ORM\Mapping\HasLifecycleCallbacks'])) {
|
if (isset($classAnnotations['Doctrine\ORM\Mapping\HasLifecycleCallbacks'])) {
|
||||||
/* @var $method \ReflectionMethod */
|
/* @var $method \ReflectionMethod */
|
||||||
foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
|
foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
|
||||||
// filter for the declaring class only, callbacks from parents will already be registered.
|
|
||||||
if ($method->getDeclaringClass()->name !== $class->name) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($this->getMethodCallbacks($method) as $value) {
|
foreach ($this->getMethodCallbacks($method) as $value) {
|
||||||
$metadata->addLifecycleCallback($value[0], $value[1]);
|
$metadata->addLifecycleCallback($value[0], $value[1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user