Commit b17ad38e authored by jwage's avatar jwage

[2.0] Renaming LifecycleListener annotation to HasLifecycleCallbacks

parent c3081adb
...@@ -244,9 +244,8 @@ class AnnotationDriver implements Driver ...@@ -244,9 +244,8 @@ class AnnotationDriver implements Driver
} }
} }
// Evaluate LifecycleListener annotation // Evaluate HasLifecycleCallbacks annotation
if (isset($classAnnotations['Doctrine\ORM\Mapping\LifecycleListener'])) { if (isset($classAnnotations['Doctrine\ORM\Mapping\HasLifecycleCallbacks'])) {
$lifecycleListenerAnnot = $classAnnotations['Doctrine\ORM\Mapping\LifecycleListener'];
foreach ($class->getMethods() as $method) { foreach ($class->getMethods() as $method) {
if ($method->isPublic()) { if ($method->isPublic()) {
$annotations = $this->_reader->getMethodAnnotations($method); $annotations = $this->_reader->getMethodAnnotations($method);
......
...@@ -119,7 +119,7 @@ final class SequenceGenerator extends Annotation { ...@@ -119,7 +119,7 @@ final class SequenceGenerator extends Annotation {
final class ChangeTrackingPolicy extends Annotation {} final class ChangeTrackingPolicy extends Annotation {}
/* Annotations for lifecycle callbacks */ /* Annotations for lifecycle callbacks */
final class LifecycleListener extends Annotation {} final class HasLifecycleCallbacks extends Annotation {}
final class PrePersist extends Annotation {} final class PrePersist extends Annotation {}
final class PostPersist extends Annotation {} final class PostPersist extends Annotation {}
final class PreUpdate extends Annotation {} final class PreUpdate extends Annotation {}
......
...@@ -43,7 +43,7 @@ class LifecycleCallbackTest extends \Doctrine\Tests\OrmFunctionalTestCase ...@@ -43,7 +43,7 @@ class LifecycleCallbackTest extends \Doctrine\Tests\OrmFunctionalTestCase
/** /**
* @Entity * @Entity
* @LifecycleListener * @HasLifecycleCallbacks
* @Table(name="lifecycle_callback_test_entity") * @Table(name="lifecycle_callback_test_entity")
*/ */
class LifecycleCallbackTestEntity class LifecycleCallbackTestEntity
...@@ -83,4 +83,3 @@ class LifecycleCallbackTestEntity ...@@ -83,4 +83,3 @@ class LifecycleCallbackTestEntity
$this->value = 'changed from preUpdate callback!'; $this->value = 'changed from preUpdate callback!';
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment