Fix deprecated use of ReflectionParameter::getClass for php 8

This commit is contained in:
Alexandre Vinet
2021-05-05 19:08:29 +02:00
parent 83119aa70b
commit c686055f15

View File

@@ -116,7 +116,8 @@ class GoutteFactory implements DriverFactory
{ {
$refl = new \ReflectionParameter(array('Goutte\Client', 'setClient'), 0); $refl = new \ReflectionParameter(array('Goutte\Client', 'setClient'), 0);
if ($refl->getClass() && 'Guzzle\Http\ClientInterface' === $refl->getClass()->getName()) { $type = $refl->getType();
if ($type instanceof \ReflectionNamedType && 'Guzzle\Http\ClientInterface' === $type->getName()) {
return true; return true;
} }