From 94b5dbde5abe914b3d7c132b9aad6d4a1353552b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Fri, 14 Feb 2020 19:15:20 +0100 Subject: [PATCH] Add missing autoload calls Until either php 7.4 or doctrine/persistence 2 is required, these will be needed to make sure php recognises signatures using the old names as compatible with signatures using the new names. This is necessary for types defined outside Symfony that extend types from Symfony and still use the old names in signatures of methods they override. More details at https://dev.to/greg0ire/how-to-deprecate-a-type-in-php-48cf Fixes https://github.com/doctrine/DoctrineMongoDBBundle/issues/616 --- src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php | 2 ++ src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php | 2 ++ .../Bridge/Doctrine/Security/User/EntityUserProvider.php | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php index c32a60b254..97f5facf62 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php @@ -282,3 +282,5 @@ abstract class DoctrineType extends AbstractType implements ResetInterface $this->choiceLoaders = []; } } + +interface_exists(ObjectManager::class); diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php index 72fab88d44..e462d5692c 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php @@ -97,3 +97,5 @@ class EntityType extends DoctrineType return [$parameter->getName(), $parameter->getType(), $parameter->getValue()]; } } + +interface_exists(ObjectManager::class); diff --git a/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php b/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php index cdcdbb8feb..69bbe66965 100644 --- a/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php @@ -153,3 +153,6 @@ class EntityUserProvider implements UserProviderInterface, PasswordUpgraderInter return $this->getObjectManager()->getClassMetadata($this->classOrAlias); } } + +interface_exists(ObjectManager::class); +interface_exists(ObjectRepository::class);