From 55598a6cb4872b46655514c9c1f2e0f091ca70f4 Mon Sep 17 00:00:00 2001 From: Marinel maxime Date: Thu, 5 Mar 2020 10:12:07 +0100 Subject: [PATCH] Fix commit gone ( https://github.com/php-enqueue/enqueue-elastica-bundle/pull/23 ) --- Doctrine/SyncIndexWithObjectChangeListener.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doctrine/SyncIndexWithObjectChangeListener.php b/Doctrine/SyncIndexWithObjectChangeListener.php index 955bf83..5751d9f 100644 --- a/Doctrine/SyncIndexWithObjectChangeListener.php +++ b/Doctrine/SyncIndexWithObjectChangeListener.php @@ -110,10 +110,11 @@ private function sendUpdateIndexMessage($action, $id) /** * @param $object * @return mixed + * @throws \ReflectionException */ private function extractId($object) { - $rp = new \ReflectionProperty($object, $this->config['model_id']); + $rp = (new \ReflectionClass($this->modelClass))->getProperty($this->config['model_id']); $rp->setAccessible(true); $id = $rp->getValue($object); $rp->setAccessible(false);