Behat: New install fails due to symfony/class-loader and minimum-stability

Created on 4 Sep 2018  路  4Comments  路  Source: Behat/Behat

On a new project running:

composer require --dev behat/behat -v

Results in:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for behat/behat ^3.5 -> satisfiable by behat/behat[v3.5.0].
    - behat/behat v3.5.0 requires symfony/class-loader ~2.1||~3.0 -> satisfiable by symfony/class-loader[3.4.x-dev] but these conflict with your requirements or minimum-stability.


Installation failed, reverting ./composer.json to its original content.

Most helpful comment

I have been able to remove the minimum stability setting by using the dev-master release of behat and mink. Composer changes look like this:

@@ -27,12 +27,12 @@
         "symfony/yaml": "*"
     },
     "require-dev": {
-        "behat/behat": "^3.5@dev",
-        "behat/mink": "^1.7@dev",
-        "behat/mink-browserkit-driver": "^1.3@dev",
-        "behat/mink-extension": "^2.1@dev",
-        "behat/symfony2-extension": "^2.1@dev",
-        "behatch/contexts": "^3.0@dev",
+        "behat/behat": "dev-master",
+        "behat/mink": "dev-master",
+        "behat/mink-browserkit-driver": "^1.3",
+        "behat/mink-extension": "^2.3.1@dev",
+        "behat/symfony2-extension": "^2.1",
+        "behatch/contexts": "^3.2",
         "friendsofphp/php-cs-fixer": "^2.12",
         "phpmd/phpmd": "^2.6",
         "phpro/grumphp": "^0.14.1",
@@ -83,6 +83,5 @@
             "allow-contrib": false,
             "require": "4.1.*"
         }
-    },
-    "minimum-stability": "dev"
+    }
 }

All 4 comments

This is a new Symfony 4.1 app.

I can work around it by:

composer config minimum-stability dev
composer require --dev behat/behat  -v

FWIW I tried the flex-way: composer require behat but the recipe couldn't load.

Re #994. Should be fixed by #1171.

Yeah, this is either fixed by upgrading to the dev version of Behat (which does not have this requirement anymore) or to the dev version of symfony/flex (which does not have the root cause of this bug anymore)

I have been able to remove the minimum stability setting by using the dev-master release of behat and mink. Composer changes look like this:

@@ -27,12 +27,12 @@
         "symfony/yaml": "*"
     },
     "require-dev": {
-        "behat/behat": "^3.5@dev",
-        "behat/mink": "^1.7@dev",
-        "behat/mink-browserkit-driver": "^1.3@dev",
-        "behat/mink-extension": "^2.1@dev",
-        "behat/symfony2-extension": "^2.1@dev",
-        "behatch/contexts": "^3.0@dev",
+        "behat/behat": "dev-master",
+        "behat/mink": "dev-master",
+        "behat/mink-browserkit-driver": "^1.3",
+        "behat/mink-extension": "^2.3.1@dev",
+        "behat/symfony2-extension": "^2.1",
+        "behatch/contexts": "^3.2",
         "friendsofphp/php-cs-fixer": "^2.12",
         "phpmd/phpmd": "^2.6",
         "phpro/grumphp": "^0.14.1",
@@ -83,6 +83,5 @@
             "allow-contrib": false,
             "require": "4.1.*"
         }
-    },
-    "minimum-stability": "dev"
+    }
 }
Was this page helpful?
0 / 5 - 0 ratings

Related issues

RusHiiii picture RusHiiii  路  6Comments

beeblebrox3 picture beeblebrox3  路  8Comments

Nyholm picture Nyholm  路  10Comments

diamondsea picture diamondsea  路  6Comments

iongion picture iongion  路  8Comments