diff --git a/src/Webfactory/Doctrine/ORMTestInfrastructure/ORMInfrastructure.php b/src/Webfactory/Doctrine/ORMTestInfrastructure/ORMInfrastructure.php index 74191ef..a535a9b 100644 --- a/src/Webfactory/Doctrine/ORMTestInfrastructure/ORMInfrastructure.php +++ b/src/Webfactory/Doctrine/ORMTestInfrastructure/ORMInfrastructure.php @@ -457,7 +457,11 @@ protected function removeAnnotationLoaderFromRegistry(\Closure $loader) unset($activeLoaders[$index]); } } - $annotationLoaderProperty->setValue(array_values($activeLoaders)); + if (is_callable([$reflection, 'setStaticPropertyValue'])) { + $reflection->setStaticPropertyValue('loaders', array_values($activeLoaders)); + } else { + $annotationLoaderProperty->setValue(array_values($activeLoaders)); + } } /**