Merge pull request #7307 from Majkl578/remaining-deprecations
Fix remaining usages of deprecated ClassLoader and Inflector from doctrine/common
This commit is contained in:
commit
96f166a7e9
@ -27,7 +27,6 @@ use Doctrine\DBAL\Types\Type;
|
|||||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
|
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
|
||||||
use Doctrine\Common\ClassLoader;
|
|
||||||
use Doctrine\ORM\Cache\CacheException;
|
use Doctrine\ORM\Cache\CacheException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1025,7 +1024,11 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
public function validateAssociations()
|
public function validateAssociations()
|
||||||
{
|
{
|
||||||
foreach ($this->associationMappings as $mapping) {
|
foreach ($this->associationMappings as $mapping) {
|
||||||
if ( ! ClassLoader::classExists($mapping['targetEntity']) ) {
|
if (
|
||||||
|
! class_exists($mapping['targetEntity'])
|
||||||
|
&& ! interface_exists($mapping['targetEntity'])
|
||||||
|
&& ! trait_exists($mapping['targetEntity'])
|
||||||
|
) {
|
||||||
throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']);
|
throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
namespace Doctrine\ORM\Tools;
|
namespace Doctrine\ORM\Tools;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
||||||
use Doctrine\Common\Util\Inflector;
|
use Doctrine\Common\Inflector\Inflector;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Type;
|
||||||
use Symfony\Component\Yaml\Yaml;
|
use Symfony\Component\Yaml\Yaml;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
namespace Doctrine\ORM\Tools;
|
namespace Doctrine\ORM\Tools;
|
||||||
|
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\Common\Util\Inflector;
|
use Doctrine\Common\Inflector\Inflector;
|
||||||
use Doctrine\DBAL\Types\Type;
|
use Doctrine\DBAL\Types\Type;
|
||||||
use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user