1
0
mirror of synced 2025-02-02 13:31:45 +03:00

Fix Lifecycle Callbacks

Remove a bit of code that breaks lifecycle callbacks of parent MappedSuperclasses
This commit is contained in:
Geoffrey Wagner 2014-01-08 17:17:47 -06:00 committed by Benjamin Eberlei
parent b566525099
commit 5f821f3b98

View File

@ -450,10 +450,6 @@ class AnnotationDriver extends AbstractAnnotationDriver
if (isset($classAnnotations['Doctrine\ORM\Mapping\HasLifecycleCallbacks'])) {
/* @var $method \ReflectionMethod */
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) {
$metadata->addLifecycleCallback($value[0], $value[1]);