<p>If you have a caret icon infront of your version number, for example</p>

<pre><code>"craftcms/cms": "^3.0.0",
</code></pre>

<p>These version numbers in <code>composer.json</code> will not change when you update.</p>

<p>The caret icon tells Composer it has free reign to update this package, but not to the next major version number. <code>^3.0.0</code> can update to <code>3.1.0</code>, <code>3.2.0</code>, <code>3.2.1</code> etc, but won't update to <code>4.0.0</code>. As such, it does not need to write to <code>composer.json</code> because the caret icon is already giving it the instructions it needs.</p>

<p>You can read more about it in the <a href="https://getcomposer.org/doc/articles/versions.md#caret-version-range-" rel="nofollow noreferrer">Composer documentation</a>.</p>

<p>Running <code>composer update</code> will (if there are updates to perform) write to <code>composer.lock</code> instead. If you are using version control, you can run a <code>git diff</code> to see what changes have been made to your lock file immediately after running an update.</p>

CC BY-SA 4.0
2019-08-02T08:09:26.017Z
2019-08-02T08:09:26.017Z
Jamie Wade
<p>My composer.json file doesn't update to the latest plugin versions when I update my plugins via the Craft CP or command line. </p>

<plugins><composer>
composer.json file not updating when plugins are updated
# composer.json file not updating when plugins are updated

(Asked by: username_0 on 2019-08-01)

My composer.json file doesn't update to the latest plugin versions when I update my plugins via the Craft CP or command line.

**Tags:** plugins, composer

---

## 1 answers

### Answer by username_1 on 2019-08-02. Score: 3 | Accepted answer

If you have a caret icon infront of your version number, for example
"craftcms/cms": "^3.0.0",

These version numbers in composer.json will not change when you update.
The caret icon tells Composer it has free reign to update this package, but not to the next major version number. ^3.0.0 can update to 3.1.0, 3.2.0, 3.2.1 etc, but won't update to 4.0.0. As such, it does not need to write to composer.json because the caret icon is already giving it the instructions it needs.
You can read more about it in the Composer documentation.
Running composer update will (if there are updates to perform) write to composer.lock instead. If you are using version control, you can run a git diff to see what changes have been made to your lock file immediately after running an update.


---

