Skip to content

Commit

Permalink
Avoid a deprecation notice when running tests with PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed Feb 27, 2024
1 parent bb27e88 commit ef5234c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

/**
Expand Down

0 comments on commit ef5234c

Please sign in to comment.