From c686055f15428541c395f6a54e27afb52a21d8c7 Mon Sep 17 00:00:00 2001 From: Alexandre Vinet Date: Wed, 5 May 2021 19:08:29 +0200 Subject: [PATCH] Fix deprecated use of ReflectionParameter::getClass for php 8 --- .../MinkExtension/ServiceContainer/Driver/GoutteFactory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php b/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php index fb10d88..03741bc 100644 --- a/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php +++ b/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php @@ -116,7 +116,8 @@ class GoutteFactory implements DriverFactory { $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; }