3

I'm upgrading a site to 3.0.41.1 (not ready to go to 3.1) and when I do I get the following error. How do I resolve this?

composer update craftcms/cms
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Can only install one of: twig/twig[v2.6.2, v2.5.0].
    - Can only install one of: twig/twig[v2.6.2, v2.5.0].
    - Can only install one of: twig/twig[v2.6.2, v2.5.0].
    - craftcms/cms 3.0.41.1 requires twig/twig ~2.6.2 -> satisfiable by twig/twig[v2.6.2].
    - Installation request for craftcms/cms 3.0.41.1 -> satisfiable by craftcms/cms[3.0.41.1].
    - Installation request for twig/twig (locked at v2.5.0) -> satisfiable by twig/twig[v2.5.0].

in composer.json I have this

"craftcms/cms": "3.0.41.1",

All other plugins were successfully updated.

3 Answers 3

2

composer update vendor/package by design does not update the dependencies of vendor/package. Instead, use

composer require --update-with-dependencies craftcms/cms:3.0.41.1

Per the docs, --update-with-dependencies will

Also update dependencies of the newly required packages, except those that are root requirements

That will update Craft to 3.0.41.1 and, because 3.0.41.1 has a new Twig requirement (~2.6.2, where 3.0.41 used ^2.5.0), it will update Twig as well.

1

so this was weird.

I had the issue when I ran this composer command

composer update craftcms/cms

however when I ran

composer update

without the specific package all went well.

1

Craft version 3.1.17.2 released -> https://github.com/craftcms/cms/blob/develop/CHANGELOG-v3.md#31172---2019-03-12

Craft now requires Twig ~2.6.2

Your Answer

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

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