From 830dff92a21995906bcb71c50a3171b367423dbe Mon Sep 17 00:00:00 2001 From: Maxime Renou Date: Tue, 19 Mar 2019 14:27:57 +0100 Subject: [PATCH] fix --- StorageBundle/Storage.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/StorageBundle/Storage.php b/StorageBundle/Storage.php index 30e8215..c617baa 100644 --- a/StorageBundle/Storage.php +++ b/StorageBundle/Storage.php @@ -44,7 +44,10 @@ class Storage protected function getStorageAnnotation($entity, $attribute) { - $reflection = new \ReflectionProperty($entity, $attribute); + $reflectionEntity = new \ReflectionObject($entity); + $reflection = $reflectionEntity->getProperty($attribute); + $reflection->setAccessible(true); + $reader = new AnnotationReader(); $annotations = $reader->getPropertyAnnotations($reflection);