diff --git a/Mapping/DocumentParser.php b/Mapping/DocumentParser.php index 0a907e15..d4fdc8b3 100644 --- a/Mapping/DocumentParser.php +++ b/Mapping/DocumentParser.php @@ -78,7 +78,6 @@ public function __construct(Reader $reader, DocumentFinder $finder) { $this->reader = $reader; $this->finder = $finder; - $this->registerAnnotations(); } /** @@ -389,33 +388,6 @@ private function getMutatorMethods(\ReflectionClass $reflectionClass, $property, throw new \LogicException($message); } - /** - * Registers annotations to registry so that it could be used by reader. - */ - private function registerAnnotations() - { - $annotations = [ - 'Document', - 'Property', - 'Embedded', - 'ObjectType', - 'Nested', - 'Id', - 'ParentDocument', - 'Routing', - 'Version', - 'HashMap', - ]; - - foreach ($annotations as $annotation) { - AnnotationRegistry::registerFile(__DIR__ . "/../Annotation/{$annotation}.php"); - } - - if (version_compare(PHP_VERSION, '7.2.0') < 0) { - AnnotationRegistry::registerFile(__DIR__ . "/../Annotation/Object.php"); - } - } - /** * Returns document type. * diff --git a/composer.json b/composer.json index 9ab1374a..0758ff6c 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "symfony/stopwatch": "^2.8|^3.0|^4|^5|^6", "symfony/templating": "^2.8|^3.0|^4|^5|^6", "symfony/asset": "^2.8|^3.0|^4|^5|^6", - "doctrine/annotations": "~1.2", + "doctrine/annotations": "^1.10", "doctrine/inflector": "^1.0 || ^2.0", "doctrine/cache": "~1.4", "doctrine/collections": "~1.4",