Identifying Composer Update Unresolvable Requirements Dependencies Conflicts

When you run composer update and get a huge wall of text telling you that your requirements could not be resolved to an installable set of packages, you can be forgiven for thinking that the important information will be at the beginning of the problem listing or perhaps at the very end. Or perhaps in one of the dozen or more authoritative-sounding statements such as “Conclusion: don’t install drupal/core 9.4.x-dev (conflict analysis result)”.

But you would be wrong. The answer is most likely in the middle, but absolutely not in any of the “Conclusion” statements. (Do not even bother going to check on why it would think you wanted to install whatever dot x-dev; if you do not think you were trying to install a development version of Drupal core, or some random old version, you very probably were not.)

The key, most of the time, is to look just above the conclusion statements. The line immediately above that is the module or other dependency you should investigate for causing a problem.

Don’t even look at the line above that one, or really any other line— only look directly above the first “- Conclusion:” statement, which will be a line like, in the case below:

- Root composer.json requires drupal/http_client_error_status ^1.0 -> satisfiable by drupal/http_client_error_status[1.0.0-beta1, ..., 1.x-dev].

That’s above the long list of conclusion statements, i think generally stuff around single isolated conclusion statements can be ignored.

There may be another line immediately above that important one that looks the same, with a different module or other dependency. Ignore it, for it is but an innocent victim of Composer’s convoluted logic.

To fix, look up the implicated dependency from the magic line.

In this case, there’s a beautiful 2.x release of http_client_error_status that solves this problem.

I fix this by editing the composer.json file directly and making the version number match.

After fixing this one thing, immediately try composer update again. The one line is the truth, every other line is likely lies. There will very likely be other dependencies to fix, but they will not be listed until you run composer update again, and fix them one at a time.

Note: When going to a newer major version of Drupal core, the Upgrade Status module can help go through this a lot faster than the one-at-a-time approach outlined here!

Sample output:

Gathering patches for root package. Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1 - drupal/core 8.0.0-beta6 requires doctrine/common dev-master#a45d110f71c323e29f41eb0696fa230e3fa1b1b5 -> found doctrine/common[2.1.3, …, 2.13.x-dev, 3.0.0, …, 3.3.x-dev] but it does not match the constraint. - drupal/core[8.0.0-beta13, …, 8.0.0-beta15] require behat/mink-goutte-driver dev-master#cc5ce119b5a8e06662f634b35967aff0b0c7dfdd -> found behat/mink-goutte-driver[dev-master, 2.x-dev (alias of dev-master)] but it conflicts with your root composer.json require (^1.2). - Root composer.json requires drupal/editor_advanced_link ^2.0 -> satisfiable by drupal/editor_advanced_link[2.0.0, 2.x-dev]. - Root composer.json requires drupal/http_client_error_status ^1.0 -> satisfiable by drupal/http_client_error_status[1.0.0-beta1, …, 1.x-dev]. - Conclusion: don’t install drupal/core 9.4.x-dev (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.0-alpha1 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.0-alpha1 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.0-beta1 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.0-beta2 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.0-beta3 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.0-beta1 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.0-beta2 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.0-beta3 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.0-rc1 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.0-rc1 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.0 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.1 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.2 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.3 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.4 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.5 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.6 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.7 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.8 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.9 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.10 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.11 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.12 (conflict analysis result) - Conclusion: don’t install drupal/core 9.2.13 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.0 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.1 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.2 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.3 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.4 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.5 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.6 (conflict analysis result) - Conclusion: don’t install drupal/core 9.3.7 (conflict analysis result) - drupal/http_client_error_status[1.0.0-beta1, …, 1.x-dev] require drupal/core ~8.0 -> satisfiable by drupal/core[8.0.0-beta6, …, 8.9.x-dev]. - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-beta6, …, 8.9.x-dev, 9.0.0-alpha1, …, 9.4.x-dev, 10.0.0-alpha1, 10.0.0-alpha2, 10.0.x-dev]. - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-beta12, …, 8.9.x-dev, 9.0.0-alpha1, …, 9.4.x-dev, 10.0.0-alpha1, 10.0.0-alpha2]. - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0-rc3, …, 8.9.x-dev, 9.0.0-alpha1, …, 9.4.x-dev, 10.0.0-alpha1, 10.0.0-alpha2, 10.0.x-dev]. - You can only install one version of a package, so only one of these can be installed: drupal/core[8.4.0-alpha1, …, 8.9.x-dev, 9.0.0-alpha1, …, 9.4.x-dev, 10.0.0-alpha1, 10.0.0-alpha2, 10.0.x-dev]. - You can only install one version of a package, so only one of these can be installed: drupal/core[8.4.0-rc1, …, 8.9.x-dev, 9.0.0-alpha1, …, 9.4.x-dev, 10.0.0-alpha1, 10.0.0-alpha2, 10.0.x-dev]. - drupal/editor_advanced_link[2.0.0, …, 2.x-dev] require drupal/core ^9.2 -> satisfiable by drupal/core[9.2.0-alpha1, …, 9.4.x-dev]. - Conclusion: don’t install drupal/core 9.3.x-dev (conflict analysis result)

Use the option –with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. composer [update] failed, composer command failed: exit status 2. stderr=