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
}
}
// Evaluate LifecycleListener annotation
if (isset($classAnnotations['Doctrine\ORM\Mapping\LifecycleListener'])) {
$lifecycleListenerAnnot = $classAnnotations['Doctrine\ORM\Mapping\LifecycleListener'];
// Evaluate HasLifecycleCallbacks annotation
if (isset($classAnnotations['Doctrine\ORM\Mapping\HasLifecycleCallbacks'])) {
foreach ($class->getMethods() as $method) {
if ($method->isPublic()) {
$annotations = $this->_reader->getMethodAnnotations($method);
......
......@@ -119,7 +119,7 @@ final class SequenceGenerator extends Annotation {
final class ChangeTrackingPolicy extends Annotation {}
/* Annotations for lifecycle callbacks */
final class LifecycleListener extends Annotation {}
final class HasLifecycleCallbacks extends Annotation {}
final class PrePersist extends Annotation {}
final class PostPersist extends Annotation {}
final class PreUpdate extends Annotation {}
......
......@@ -43,7 +43,7 @@ class LifecycleCallbackTest extends \Doctrine\Tests\OrmFunctionalTestCase
/**
* @Entity
* @LifecycleListener
* @HasLifecycleCallbacks
* @Table(name="lifecycle_callback_test_entity")
*/
class LifecycleCallbackTestEntity
......@@ -82,5 +82,4 @@ class LifecycleCallbackTestEntity
public function doStuffOnPreUpdate() {
$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