Skip to content

Add missing autoload calls #35728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
  • Loading branch information
greg0ire committed Feb 14, 2020
commit 94b5dbde5abe914b3d7c132b9aad6d4a1353552b
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,5 @@ public function reset()
$this->choiceLoaders = [];
}
}

interface_exists(ObjectManager::class);
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,5 @@ private function parameterToArray(Parameter $parameter): array
return [$parameter->getName(), $parameter->getType(), $parameter->getValue()];
}
}

interface_exists(ObjectManager::class);
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,6 @@ private function getClassMetadata(): ClassMetadata
return $this->getObjectManager()->getClassMetadata($this->classOrAlias);
}
}

interface_exists(ObjectManager::class);
interface_exists(ObjectRepository::class);