8000 minor #10311 [PropertyInfo] Inject the entity manager instead of the … · symfony/symfony-docs@09db304 · GitHub
[go: up one dir, main page]

Skip to content

Commit 09db304

Browse files
committed
minor #10311 [PropertyInfo] Inject the entity manager instead of the class metadata factory (dunglas, javiereguiluz)
This PR was merged into the master branch. Discussion ---------- [PropertyInfo] Inject the entity manager instead of the class metadata factory symfony/symfony#27829 Commits ------- 44df1a7 Added the missing versionadded directive 1f87e0c [PropertyInfo] Inject the entity manager instead of the class metadata factory
2 parents fd0ce36 + 44df1a7 commit 09db304

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/property_info.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,18 @@ with the ``property_info`` service in the Symfony Framework.
486486
'driver' => 'pdo_sqlite',
487487
// ...
488488
], $config);
489-
$doctrineExtractor = new DoctrineExtractor($entityManager->getMetadataFactory());
489+
$doctrineExtractor = new DoctrineExtractor($entityManager);
490490
491491
// List information.
492492
$doctrineExtractor->getProperties($class);
493493
// Type information.
494494
$doctrineExtractor->getTypes($class, $property);
495495
496+
.. versionadded:: 4.2
497+
The option to pass Doctrine's EntityManager to ``DoctrineExtractor`` was
498+
introduced in Symfony 4.2. Previously you needed to pass the class metadata
499+
factory associated to the EntityManager.
500+
496501
.. _`components-property-information-extractors-creation`:
497502

498503
Creating Your Own Extractors

0 commit comments

Comments
 (0)
0