From 346e34adf60d8544712d6aa447ca7237c5e3c3ed Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sun, 8 Jul 2012 17:33:50 +0200 Subject: [PATCH] Reverting to default annotation driver with - delayed to 3.0 --- UPGRADE.md | 28 ------------------- lib/Doctrine/ORM/Configuration.php | 2 +- lib/Doctrine/ORM/Tools/Setup.php | 2 +- .../Doctrine/Tests/ORM/ConfigurationTest.php | 4 +-- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 05d19ffa8..f2c99322a 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,33 +1,5 @@ # Upgrade to 2.3 -## Configuration *BC Break* - -The default annotation syntax has been changed from `@Entity` to `@ORM\Entity`. If you still want to use the simplified -version, you should use `Doctrine\Common\Annotations\SimpleAnnotationReader` for your AnnotationDriver or call -`Doctrine\ORM\Configuration#newDefaultAnnotationDriver` with its second parameter set to `true`. - - * before: - ```php - setMetadataDriverImpl($config->newDefaultAnnotationDriver($paths, $useSimpleAnnotationReader)); diff --git a/tests/Doctrine/Tests/ORM/ConfigurationTest.php b/tests/Doctrine/Tests/ORM/ConfigurationTest.php index 20feb49b1..b53fd617b 100644 --- a/tests/Doctrine/Tests/ORM/ConfigurationTest.php +++ b/tests/Doctrine/Tests/ORM/ConfigurationTest.php @@ -65,7 +65,7 @@ class ConfigurationTest extends PHPUnit_Framework_TestCase $paths = array(__DIR__); $reflectionClass = new ReflectionClass(__NAMESPACE__ . '\ConfigurationTestAnnotationReaderChecker'); - $annotationDriver = $this->configuration->newDefaultAnnotationDriver($paths); + $annotationDriver = $this->configuration->newDefaultAnnotationDriver($paths, false); $reader = $annotationDriver->getReader(); $annotation = $reader->getMethodAnnotation( $reflectionClass->getMethod('namespacedAnnotationMethod'), @@ -73,7 +73,7 @@ class ConfigurationTest extends PHPUnit_Framework_TestCase ); $this->assertInstanceOf('Doctrine\ORM\Mapping\PrePersist', $annotation); - $annotationDriver = $this->configuration->newDefaultAnnotationDriver($paths, true); + $annotationDriver = $this->configuration->newDefaultAnnotationDriver($paths); $reader = $annotationDriver->getReader(); $annotation = $reader->getMethodAnnotation( $reflectionClass->getMethod('simpleAnnotationMethod'),