Fix BC issue in phpDoc Reflection library

The used phpDocumentor library DocBlockReflection contained an BC break
that broke this component. The patch was applied in the recent released v4.3.4
version. But since it is unclear how long this issue existed it is not possible
to exclude a certain version. Therefor also `\RuntimeExpception` needs to be catched.

The BC break is possibly caused by a change in the TypeResolver library used by the
DocBlockReflection which is now supporting the more populair generics notation for arrays.
This commit is contained in:
Jaapio 2019-12-28 22:02:19 +01:00
parent 7aba9cf753
commit bad07ec557
No known key found for this signature in database
GPG Key ID: 23037689C7B51CB9

View File

@ -212,6 +212,8 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
return $this->docBlockFactory->create($reflectionProperty, $this->contextFactory->createFromReflector($reflectionProperty->getDeclaringClass()));
} catch (\InvalidArgumentException $e) {
return null;
} catch (\RuntimeException $e) {
return null;
}
}
@ -257,6 +259,8 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
return [$this->docBlockFactory->create($reflectionMethod, $this->contextFactory->createFromReflector($reflectionMethod)), $prefix];
} catch (\InvalidArgumentException $e) {
return null;
} catch (\RuntimeException $e) {
return null;
}
}
}