I have an existing Drupal 8.9.16 site which uses Composer 1 (and Commerce 2.24). I am trying to upgrade to using Composer 2 using this guide: https://www.drupal.org/docs/develop/using-composer/preparing-your-site-for-composer-2.
I have gotten through all the required steps up to the last step of dealing with drupal-scaffold (https://www.drupal.org/docs/develop/using-composer/using-drupals-composer-scaffold#s-migrating-composer-scaffold). The last step of that is to require drupal/core-recommended:^8.9. As I don't want to update core right now I am trying to run:
composer require drupal/core-recommended:8.9.16
but I am blocked by:
- Can only install one of: symfony/yaml[v3.4.41, v3.4.47].
- drupal/core-recommended 8.9.19 requires symfony/yaml v3.4.41 -> satisfiable by symfony/yaml[v3.4.41].
As a guess, I try requiring symfony/yaml:3.4.41. This fixes this issue and then moves on to the next symfony plugin which generates a similar error. Started going through all of these but there are a lot of symphony plugins and this can't possibly be the right way to do this.
What am I missing here?
composer require drupal/core-recommended:8.9.16 -w
? That will do any dependency updates along with the require. If you happen to be requiring any of the dependencies that are causing issues in your own composer.json, try the-W
flag instead. See getcomposer.org/doc/03-cli.md#require for more info--update-with-dependencies
instead