From 998df2bf711d4fa2c02909b28e1915d5a037ca48 Mon Sep 17 00:00:00 2001 From: Matthew Clarkson Date: Thu, 13 Aug 2015 12:16:21 +1000 Subject: [PATCH] Fixes instantiating entities with constructor args --- Indexer/Indexer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Indexer/Indexer.php b/Indexer/Indexer.php index 889e1004..e2568f63 100644 --- a/Indexer/Indexer.php +++ b/Indexer/Indexer.php @@ -143,7 +143,8 @@ public function discoverEntity($entity_or_class, EntityManager $em) if ($reflClass->isAbstract()) { return false; } - $entity = new $class(); + + $entity = $reflClass->newInstanceWithoutConstructor(); } // check if we already saw this type of entity