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

<pre><code>composer require --update-with-dependencies craftcms/cms:3.0.41.1
</code></pre>

<p>Per the <a href="https://getcomposer.org/doc/03-cli.md#require" rel="nofollow noreferrer">docs</a>, <code>--update-with-dependencies</code> will</p>

<blockquote>
  <p>Also update dependencies of the newly required packages, except those that are root requirements</p>
</blockquote>

<p>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.</p>

CC BY-SA 4.0
2019-04-29T21:46:56.317Z
2019-04-30T14:34:32.123Z
2019-04-30T14:34:32.123Z
henry
<p>so this was weird.</p>

<p>I had the issue when I ran this composer command</p>

<pre><code>composer update craftcms/cms
</code></pre>

<p>however when I ran</p>

<pre><code>composer update
</code></pre>

<p>without the specific package all went well.</p>

CC BY-SA 4.0
2019-04-11T16:18:25.870Z
2019-04-11T16:18:25.870Z
CreateSean
<p>Craft version 3.1.17.2 released -> <a href="https://github.com/craftcms/cms/blob/develop/CHANGELOG-v3.md#31172---2019-03-12" rel="nofollow noreferrer">https://github.com/craftcms/cms/blob/develop/CHANGELOG-v3.md#31172---2019-03-12</a></p>

<pre><code>Craft now requires Twig ~2.6.2
</code></pre>

CC BY-SA 4.0
2019-04-30T04:00:46.263Z
2019-04-30T04:00:46.263Z
Priti Rathod
<p>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?</p>

<pre><code>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 -&gt; satisfiable by twig/twig[v2.6.2].
    - Installation request for craftcms/cms 3.0.41.1 -&gt; satisfiable by craftcms/cms[3.0.41.1].
    - Installation request for twig/twig (locked at v2.5.0) -&gt; satisfiable by twig/twig[v2.5.0].
</code></pre>

<p>in composer.json I have this</p>

<pre><code>"craftcms/cms": "3.0.41.1",
</code></pre>

<p>All other plugins were successfully updated.</p>

<error><updates><updating><composer>
cannot update Craft CMS - composer errors
# cannot update Craft CMS - composer errors

(Asked by: username_0 on 2019-04-11)

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.

**Tags:** error, updates, updating, composer


---

## 3 answers

### Answer by username_1 on 2019-04-29. Score: 2 | Accepted answer

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.


---

### Answer by username_0 on 2019-04-11. Score: 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.


---

### Answer by username_2 on 2019-04-30. Score: 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


---

