Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Goutte\Client::setClient() does not exist #380

@rkeet

Description

@rkeet

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

$refl = new \ReflectionParameter(array('Goutte\Client', 'setClient'), 0);

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions