From 1f87e0c4b2fca36145bda8ef6733140938fa5eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 10 Sep 2018 17:08:25 +0200 Subject: [PATCH 1/2] [PropertyInfo] Inject the entity manager instead of the class metadata factory --- components/property_info.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/property_info.rst b/components/property_info.rst index 0b240497dc5..4efa494b5ab 100644 --- a/components/property_info.rst +++ b/components/property_info.rst @@ -455,7 +455,7 @@ with the ``property_info`` service in the Symfony Framework. 'driver' => 'pdo_sqlite', // ... ], $config); - $doctrineExtractor = new DoctrineExtractor($entityManager->getMetadataFactory()); + $doctrineExtractor = new DoctrineExtractor($entityManager); // List information. $doctrineExtractor->getProperties($class); From 44df1a71a8afd7d68d65987aaf5df5c9e31d6890 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 11 Sep 2018 10:18:56 +0200 Subject: [PATCH 2/2] Added the missing versionadded directive --- components/property_info.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/property_info.rst b/components/property_info.rst index 4efa494b5ab..c4787e32028 100644 --- a/components/property_info.rst +++ b/components/property_info.rst @@ -462,6 +462,11 @@ with the ``property_info`` service in the Symfony Framework. // Type information. $doctrineExtractor->getTypes($class, $property); +.. versionadded:: 4.2 + The option to pass Doctrine's EntityManager to ``DoctrineExtractor`` was + introduced in Symfony 4.2. Previously you needed to pass the class metadata + factory associated to the EntityManager. + .. _`components-property-information-extractors-creation`: Creating Your Own Extractors