minkphp / MinkSelenium2Driver

Selenium2 (webdriver) driver for Mink framework
MIT License
507 stars 163 forks source link

Selenium2Driver member declaration not compatible with CoreDriver #377

Closed lruozzi9 closed 9 months ago

lruozzi9 commented 9 months ago

Affected version: 1.7

PHP Fatal error:  Declaration of Behat\Mink\Driver\Selenium2Driver::visit(string $url) must be compatible with Behat\Mink\Driver\CoreDriver::visit($url) in /vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php on line 401
mnocon commented 9 months ago

From what I can tell the declaration is compatible with minkphp/mink: https://github.com/minkphp/Mink/blob/master/src/Driver/CoreDriver.php#L86 but not with the FriendsOfBehat/Mink fork: https://github.com/FriendsOfBehat/Mink/blob/master/src/Driver/CoreDriver.php#L73

stof commented 9 months ago

Given that the FriendsOfBehat is not kept uptodate with the official repo, you should stop using it.

lruozzi9 commented 9 months ago

Ah, you're right! The problem is that Sylius uses this fork. Anyway, an issue should be open there and not here! Thanks!

stof commented 9 months ago

Well, the recommended approach is to use the official Mink packages (which is where maintenance is happening). Another working approach is to use the FriendsOfBehat forks for them for all the Mink packages being used (so that you use the outdated forks for all of them).

Note that the MinkExtension for Behat is not part of those "official Mink packages" I mentioned in the previous packages (this is a Behat extension, where FriendsOfBehat is now the maintained source instead of Behat, not a package that has been migrated to the minkphp github organization)