1
0
mirror of synced 2025-01-08 10:07:10 +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
parent 93c1106735
commit db31c58102

View File

@ -469,10 +469,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]);