zenstruck / browser

A fluent interface for your Symfony functional tests.
MIT License
186 stars 17 forks source link

Installing zenstruck/browser on PHP 8.1 and Symfony 6.0 errors #65

Closed shadowc closed 2 years ago

shadowc commented 2 years ago
Using version ^0.9.1 for zenstruck/browser
./composer.json has been updated
Running composer update zenstruck/browser --with-all-dependencies
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "6.0.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - behat/mink[v1.8.0, ..., v1.9.0] require symfony/css-selector ^2.7|^3.0|^4.0|^5.0 -> found symfony/css-selector[v2.7.0, ..., v2.8.52, v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.27, v5.0.0, ..., v5.4.0] but it conflicts with your root composer.json require (^6.0).
    - zenstruck/browser v0.9.1 requires behat/mink ^1.8 -> satisfiable by behat/mink[v1.8.0, v1.8.1, v1.9.0].
    - Root composer.json requires zenstruck/browser ^0.9.1 -> satisfiable by zenstruck/browser[v0.9.1].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require zenstruck/browser:*" to figure out if any version is installable, or "composer require zenstruck/browser:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I think the culprit is that we don't allow for newer versions of behat/mink. If there are no bc breaking changes, I can probably create a PR with this small change to see if this fixes the composer conflicts.

kbond commented 2 years ago

The issue is there isn't a release of mink that allows Symfony 6 - only it's master/1.x branch.

This should solve the issue:

composer require behat/mink:"1.x-dev" zenstruck/browser

And once there is new mink release, you can remove mink from your composer.json.

shadowc commented 2 years ago

That actually worked. Thanks for the tip! You may close this issue!

shadowc commented 2 years ago

Or I can close it :)