1
0
mirror of synced 2025-02-03 05:49:25 +03:00

#5934 - #5938 - fix accidentally introduced regression with wrong target of ::class expression

This commit is contained in:
Maximilian Bosch 2017-05-31 15:01:25 +02:00
parent fcfaa13df9
commit 49bb345533
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
3 changed files with 5 additions and 3 deletions

View File

@ -472,7 +472,7 @@ class AnnotationDriver extends AbstractAnnotationDriver
// Check for `fetch` // Check for `fetch`
if ($associationOverride->fetch) { if ($associationOverride->fetch) {
$override['fetch'] = constant(ClassMetadata::class . '::FETCH_' . $associationOverride->fetch); $override['fetch'] = constant(Mapping\ClassMetadata::class . '::FETCH_' . $associationOverride->fetch);
} }
$metadata->setAssociationOverride($fieldName, $override); $metadata->setAssociationOverride($fieldName, $override);

View File

@ -24,6 +24,7 @@ use Doctrine\Common\Persistence\Mapping\Driver\FileDriver;
use Doctrine\ORM\Mapping\Builder\EntityListenerBuilder; use Doctrine\ORM\Mapping\Builder\EntityListenerBuilder;
use Doctrine\Common\Persistence\Mapping\ClassMetadata; use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\MappingException; use Doctrine\ORM\Mapping\MappingException;
use Doctrine\ORM\Mapping\ClassMetadata as Metadata;
/** /**
* XmlDriver is a metadata driver that enables mapping through XML files. * XmlDriver is a metadata driver that enables mapping through XML files.
@ -623,7 +624,7 @@ class XmlDriver extends FileDriver
// Check for `fetch` // Check for `fetch`
if (isset($overrideElement['fetch'])) { if (isset($overrideElement['fetch'])) {
$override['fetch'] = constant(ClassMetadata::class . '::FETCH_' . (string) $overrideElement['fetch']); $override['fetch'] = constant(Metadata::class . '::FETCH_' . (string) $overrideElement['fetch']);
} }
$metadata->setAssociationOverride($fieldName, $override); $metadata->setAssociationOverride($fieldName, $override);

View File

@ -22,6 +22,7 @@ namespace Doctrine\ORM\Mapping\Driver;
use Doctrine\Common\Persistence\Mapping\ClassMetadata; use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\Builder\EntityListenerBuilder; use Doctrine\ORM\Mapping\Builder\EntityListenerBuilder;
use Doctrine\Common\Persistence\Mapping\Driver\FileDriver; use Doctrine\Common\Persistence\Mapping\Driver\FileDriver;
use Doctrine\ORM\Mapping\ClassMetadata as Metadata;
use Doctrine\ORM\Mapping\MappingException; use Doctrine\ORM\Mapping\MappingException;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
@ -624,7 +625,7 @@ class YamlDriver extends FileDriver
// Check for `fetch` // Check for `fetch`
if (isset($associationOverrideElement['fetch'])) { if (isset($associationOverrideElement['fetch'])) {
$override['fetch'] = constant(ClassMetadata::class . '::FETCH_' . $associationOverrideElement['fetch']); $override['fetch'] = constant(Metadata::class . '::FETCH_' . $associationOverrideElement['fetch']);
} }
$metadata->setAssociationOverride($fieldName, $override); $metadata->setAssociationOverride($fieldName, $override);