MinkExtension
MinkExtension copied to clipboard
Goutte\Client::setClient() does not exist
Having the following requirements in require-dev
in composer.json
:
"atoum/atoum": "^4.0", (4.0.3)
"behat/behat": "^3.8", (v3.10.0)
"behat/mink-browserkit-driver": "^2.0", (v2.0.0)
"behat/mink-goutte-driver": "^2.0", (v2.0.0)
"behat/mink-selenium2-driver": "^1.5", (v1.5.0)
Running php vendor/bin/behat
instantly crashes on:
In GoutteFactory.php line 117:
Method Goutte\Client::setClient() does not exist
Function causing the Exception https://github.com/Behat/MinkExtension/blob/ba8ba8bde58b168f409c7c1e8e4b906c12856124/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php#L117
Function:
private function isGoutte1()
{
$refl = new \ReflectionParameter(array('Goutte\Client', 'setClient'), 0);
$type = $refl->getType();
if ($type instanceof \ReflectionNamedType && 'Guzzle\Http\ClientInterface' === $type->getName()) {
return true;
}
return false;
}
Now, Goutte\Client
is an empty class which extends Symfony\Component\BrowserKit\HttpBrowser
which in turn extends Symfony\Component\BrowserKit\AbstractBrowser
.
Neither of the parent classes indeed have the function setClient
.
What can I do to work around this for now or create a fix?
Same here, any chance to merge the #381 ?
the #381 has been created months ago, is there any chance merge or not? I need it.
Looking at this: https://github.com/Behat/MinkExtension/issues?q=is%3Aissue+sort%3Aupdated-desc I'm thinking this repository is quite dead.
Also judging by the non-response on this issue from 2020: https://github.com/Behat/MinkExtension/issues/370
Haven't tried it out yet (maybe some week soon), but I think it's worth switching to: https://github.com/FriendsOfBehat/MinkExtension
I switched to FriendsOfBehat, it worked for me.
Replacing behat/mink-extension
with friends-of-behat/mink-extension
resolved issue for me.
This project seems abandoned.