From 7d88be8978ddc2ae48a87cc8264fbf4ef36c40c3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 12 Dec 2019 14:16:57 +0100 Subject: [PATCH] Fix merge --- src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php | 2 +- .../Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php index 47d2d5175e..57e129df0e 100644 --- a/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php +++ b/src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php @@ -202,7 +202,7 @@ class DoctrineExtractor implements PropertyListExtractorInterface, PropertyTypeE { try { return $this->entityManager ? $this->entityManager->getClassMetadata($class) : $this->classMetadataFactory->getMetadataFor($class); - } catch (MappingException | OrmMappingException $exception) { + } catch (MappingException | OrmMappingException | LegacyMappingException $exception) { return null; } } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php index 09c7981454..5c91d54de6 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/DoctrineChoiceLoaderTest.php @@ -408,7 +408,7 @@ class DoctrineChoiceLoaderTest extends TestCase }) ; - $this->om = $this->createMock(ObjectManager::class); + $this->om = $this->createMock(interface_exists(ObjectManager::class) ? ObjectManager::class : LegacyObjectManager::class); $this->om->expects($this->once()) ->method('getClassMetadata') ->with(SingleIntIdEntity::class)