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
This commit is contained in:
Grégoire Paris 2020-02-14 19:15:20 +01:00
parent 7a6e3c07b3
commit 94b5dbde5a
No known key found for this signature in database
GPG Key ID: 24D48B8012B116BF
3 changed files with 7 additions and 0 deletions

View File

@ -282,3 +282,5 @@ abstract class DoctrineType extends AbstractType implements ResetInterface
$this->choiceLoaders = [];
}
}
interface_exists(ObjectManager::class);

View File

@ -97,3 +97,5 @@ class EntityType extends DoctrineType
return [$parameter->getName(), $parameter->getType(), $parameter->getValue()];
}
}
interface_exists(ObjectManager::class);

View File

@ -153,3 +153,6 @@ class EntityUserProvider implements UserProviderInterface, PasswordUpgraderInter
return $this->getObjectManager()->getClassMetadata($this->classOrAlias);
}
}
interface_exists(ObjectManager::class);
interface_exists(ObjectRepository::class);