From fcfaa13df9aada8321236a1459b58cc0eeabdf7b Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 31 May 2017 14:52:29 +0200 Subject: [PATCH] #5934 - #5938 - use `ClassMetadata::class` expression rather than FQCN in config drivers as of @Ocramius's review --- lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php | 2 +- lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php | 2 +- lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index 59730f6b2..d916bafb3 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -472,7 +472,7 @@ class AnnotationDriver extends AbstractAnnotationDriver // Check for `fetch` if ($associationOverride->fetch) { - $override['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $associationOverride->fetch); + $override['fetch'] = constant(ClassMetadata::class . '::FETCH_' . $associationOverride->fetch); } $metadata->setAssociationOverride($fieldName, $override); diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index 0d51c4c92..2ca9190bc 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -623,7 +623,7 @@ class XmlDriver extends FileDriver // Check for `fetch` if (isset($overrideElement['fetch'])) { - $override['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string) $overrideElement['fetch']); + $override['fetch'] = constant(ClassMetadata::class . '::FETCH_' . (string) $overrideElement['fetch']); } $metadata->setAssociationOverride($fieldName, $override); diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php index 394722847..d65481be4 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -624,7 +624,7 @@ class YamlDriver extends FileDriver // Check for `fetch` if (isset($associationOverrideElement['fetch'])) { - $override['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . $associationOverrideElement['fetch']); + $override['fetch'] = constant(ClassMetadata::class . '::FETCH_' . $associationOverrideElement['fetch']); } $metadata->setAssociationOverride($fieldName, $override);