eb112a5288
This PR was squashed before being merged into the 4.2-dev branch (closes #27829).
Discussion
----------
[DoctrineBridge] Inject the entity manager instead of the class metadata factory in DoctrineExtractor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? |no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a
As explained by @stof in https://github.com/symfony/symfony/pull/27735#discussion_r199797412, injecting the `ClassMetadataFactory` directly can lead to issues when resetting the EntityManager.
This PR deprecates this usage and encourages to inject the entity manager directly.
Commits
-------
|
||
---|---|---|
.. | ||
CacheWarmer | ||
DataCollector | ||
DataFixtures | ||
DependencyInjection | ||
Form | ||
Logger | ||
Messenger | ||
PropertyInfo | ||
Security | ||
Test | ||
Tests | ||
Validator | ||
.gitignore | ||
CHANGELOG.md | ||
composer.json | ||
ContainerAwareEventManager.php | ||
LICENSE | ||
ManagerRegistry.php | ||
phpunit.xml.dist | ||
README.md | ||
RegistryInterface.php |