Behat / MinkExtension

Mink extension (tight integration and configuration) for Behat
MIT License
636 stars 279 forks source link

Support for Symfony 5.x #361

Closed didix16 closed 11 months ago

didix16 commented 4 years ago

Hi guys,

Could be possible the compatibility with symfony 5.x configs?

I'm trying to install Laravel 7 which uses symfony 5 components but minkextension is only compatible till symfony 4.

Thanks in advance

chadyred commented 4 years ago

I have just done a pull request for this and I am in your same case. I submit it and I give it a try on my project ASAP and give you my feedback on it.

chadyred commented 4 years ago

It works like a charm so I wait for merge !

didix16 commented 4 years ago

Perfect, thank you so much!

chadyred commented 4 years ago

You could use this branch if you want : cdaguerre:sf-5-compat. Their are 2 other PR on this subjet, I close mine in favorite of this one : https://github.com/Behat/MinkExtension/issues/361 !

didix16 commented 4 years ago

Ok, thanks. I'll try to use that branch. Let's see if it works with my project :)

AmokraneMancer commented 4 years ago

Does any one have a solution to make it run on Symfony 5.x ?

chadyred commented 4 years ago

In your composer.json, to resolve this issue use my github repo that fix this dependencies:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/chadyred/MinkExtension"
        }
    ],
    "require-dev": {
        "behat/mink-extension": "dev-upgrade/allow-symony-5 as 2.3",
    }
}
chadyred commented 4 years ago

@AmokraneMancer up

AmokraneMancer commented 4 years ago

Thank you so much @chadyred. it works perfectly !

chadyred commented 4 years ago

You're welcome !

much-rebel commented 1 year ago

Can't make it work as @chadyred suggested:

# composer.json
"require-dev": {
    "behat/mink-extension": "dev-upgrade/allow-symony-5 as 2.3",
...
# CLI
$: composer-2 update
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Restricting packages listed in "symfony/symfony" to "5.4.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires behat/mink-extension dev-upgrade/allow-symony-5 as 2.3, found behat/mink-extension[dev-master, v1.0.0, ..., 1.3.x-dev, v2.0.0, ..., 2.x-dev (alias of dev-master)] but it does not match the constraint.
chadyred commented 1 year ago

Did you add this in your composer.json

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/chadyred/MinkExtension"
        }
    ],
much-rebel commented 1 year ago

I tried that with no luck tho. In the end I've switched to https://github.com/FriendsOfBehat/MinkExtension which works just fine without the need of aliasing and stuff.

chadyred commented 1 year ago

You are right, this is the best way as the https://github.com/FriendsOfBehat/MinkExtension is the main repository for MinkExtension and the maintain repository