drupal-project icon indicating copy to clipboard operation
drupal-project copied to clipboard

Force update module using composer

Open nxut opened this issue 7 years ago • 2 comments

I ran composer outdated drupal/* and noticed that I need to update devel module: drupal/devel 1.2.0 to 2.0.0

In composer.json I have: "require-dev": { "drupal/devel": "1.*" }

When I ran composer update drupal/devel --with-dependencies nothing changes. Can anyone explain this to me please? Thank you in advance!

nxut avatar Mar 20 '19 08:03 nxut

You are fixing the major version to always use devel from the 1.x branch. The usual approach when you want to update major versions is to edit the composer.json to something like

 "require-dev": { "drupal/devel": "^2" }

and then run

 composer update drupal/devel --with-dependencies

alternative the command

 composer require --dev drupal/devel:^2

will do also edit the composer.json for you.

Please close the issue if this helped.

rodrigoaguilera avatar Mar 20 '19 08:03 rodrigoaguilera

arigato gozaimashita :smile:

nxut avatar Mar 20 '19 08:03 nxut