Skip to content

Commit bceef1a

Browse files
committed
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 doctrine/DoctrineMongoDBBundle#616
1 parent 0cc1d00 commit bceef1a

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Form/Type/DoctrineType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,3 +282,5 @@ public function reset()
282282
$this->choiceLoaders = [];
283283
}
284284
}
285+
286+
interface_exists(ObjectManager::class);

Form/Type/EntityType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,5 @@ private function parameterToArray(Parameter $parameter): array
9797
return [$parameter->getName(), $parameter->getType(), $parameter->getValue()];
9898
}
9999
}
100+
101+
interface_exists(ObjectManager::class);

Security/User/EntityUserProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,6 @@ private function getClassMetadata(): ClassMetadata
153153
return $this->getObjectManager()->getClassMetadata($this->classOrAlias);
154154
}
155155
}
156+
157+
interface_exists(ObjectManager::class);
158+
interface_exists(ObjectRepository::class);

0 commit comments

Comments
 (0)