0

When running composer update, I get the following error:

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

  Problem 1
    - Can only install one of: symfony/yaml[3.2.x-dev, 2.8.x-dev].
    - Can only install one of: symfony/yaml[v2.8.0, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.0-BETA1, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.1, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.10, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.11, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.12, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.13, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.14, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.15, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.16, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.17, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.18, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.19, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.2, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.20, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.21, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.22, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.23, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.24, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.25, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.26, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.27, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.28, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.3, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.4, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.5, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.6, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.7, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.8, 3.2.x-dev].
    - Can only install one of: symfony/yaml[v2.8.9, 3.2.x-dev].
    - Can only install one of: symfony/yaml[3.2.x-dev, v2.8.28].
    - drupal/core 8.4.0 requires symfony/yaml ~3.2.8 -> satisfiable by symfony/yaml[3.2.x-dev].
    - Installation request for drupal/core 8.4.0 -> satisfiable by drupal/core[8.4.0].
    - Installation request for symfony/yaml ~2.8 -> satisfiable by symfony/yaml[2.8.x-dev, v2.8.0, v2.8.0-BETA1, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.2, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9].

I've seen a few explanations for similar errors, but I can't figure out how to fix it. I assume it has something to do with incompatibilities between yaml versions. How do I go about solving this?

2
  • Since Drupal 8.4.0 has ~3.2.8 as restriction, did you check what is requesting a 2.x version?
    – apaderno
    Oct 9, 2017 at 17:00
  • @kiamlaluno Yes, Drupal Core and most modules are requiring ~2.8.
    – Kellen
    Oct 9, 2017 at 17:30

2 Answers 2

4

So, I've found a solution. I had to go into my composer.json file and specific these versions under require:

"drupal/core": "~8.4",
"drush/drush": "~9.0",

Once I updated those lines, I deleted the composer.lock file as well as the vendor directory. After that, I was able to install Drupal 8.4 using composer update --with-dependencies.

2
  • 2
    Yes, putting drupal/core in the require section is what I do in all my Drupal sites.
    – apaderno
    Oct 13, 2017 at 5:16
  • Even when not having installed drush, the deletion of the composer.lock file and the vendor directory did the job. Jan 1, 2018 at 16:50
0

This is what worked for me

Requirement : PHP 7.1
Explanation :
1. Doctrire, a dependancy of Drupal core, requires PHP 7.1. Doctrine uses the latest PHP 7.1 syntax to declare the methods' return type eg. function my_function() : void {...}. There is a core bug concerning this issue with status "Needs work". Even if this bug is patched, 8.4 requires PHP 7.
2. webflo breaks the chain of dependencies
3. Drupal 8.4 requires Drush 9.0

If you have PHP 7.1 on your server you can do the following:

  1. edit the composer.json file: "drupal/core": "~8.4" and "drush/drush": "~9.0"
  2. delete composer.lock
  3. delete vendor
  4. update webflo: composer require "webflo/drupal-finder ~1.0.0"
  5. update the database: ../vendor/bin/drush updb -y
  6. update the entities schemas: ../vendor/bin/drush entup -y

Applied on three different production servers (Linux + Apache) and on local environments (macOS + Apach, Ubuntu + Apache). Not tested with Vagrant.

The two entity updates are concerning "paragraph entity type" : (1) The Published field needs to be updated. (2) The Behavior settings field needs to be updated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.