mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Merge pull request #1938 from magnetik/1937
Fixes symfony serializer being mandatory
This commit is contained in:
commit
cc6731ae77
@ -188,6 +188,9 @@ class ObjectModelDescriber implements ModelDescriberInterface, ModelRegistryAwar
|
||||
*/
|
||||
private function getAnnotation(\ReflectionClass $reflection, string $className)
|
||||
{
|
||||
if (false === class_exists($className)) {
|
||||
return null;
|
||||
}
|
||||
if (\PHP_VERSION_ID >= 80000) {
|
||||
if (null !== $attribute = $reflection->getAttributes($className, \ReflectionAttribute::IS_INSTANCEOF)[0] ?? null) {
|
||||
return $attribute->newInstance();
|
||||
|
Loading…
x
Reference in New Issue
Block a user