Skip to content
Latchkey

Composer "Your requirements could not be resolved to an installable set of packages" in CI

Composer ran its solver across your composer.json constraints and proved no set of versions satisfies all of them together. The "Problem 1/2/..." block beneath the headline names exactly which requirements collide.

What this error means

composer install or composer update stops with "Your requirements could not be resolved to an installable set of packages." followed by one or more "Problem N" explanations.

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

  Problem 1
    - Root composer.json requires monolog/monolog ^3.0 but it conflicts with
      another require: symfony/monolog-bundle 3.8 requires monolog/monolog ^2.0.

Common causes

Two requirements demand incompatible ranges

One package needs monolog/monolog ^3 while another caps it at ^2. No single version sits in both ranges, so the solve fails.

A constraint references a version that does not exist

A tight ^X or branch alias points at a release that was never published, leaving the solver with no candidate.

How to fix it

Read each "Problem" and relax or upgrade

  1. Read which two packages the "Problem N" block names.
  2. Upgrade the package holding the lower cap to a release that accepts the version you need.
  3. Re-run composer update <vendor/pkg> for just the affected packages to confirm.
Terminal
composer update symfony/monolog-bundle monolog/monolog --with-dependencies

See why a version is rejected

Use composer why-not to learn which constraint blocks the version you want before changing anything.

Terminal
composer why-not monolog/monolog 3.0

How to prevent it

  • Upgrade related bundles and their dependencies together.
  • Prefer caret ranges over exact pins in your root composer.json.
  • Commit composer.lock so the solve runs once, not on every CI job.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →