1

I am managing a Drupal 8 site in Composer. Commerce 2.0 was just released; I currently have 2.0-rc2 installed on my site.

This is my composer.json

"drupal/commerce": "^2.0@RC",

"minimum-stability": "dev",
"prefer-stable": true,

To update, I ran composer update drupal/commerce --with-dependencies, which gave me this result:

Gathering patches for root package.
Dependency "drupal/core" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "drupal/core" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "drupal/core" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "drupal/core" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "drupal/core" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "drupal/core" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Dependency "drupal/core" is also a root requirement, but is not explicitly whitelisted. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
Warning: Ambiguous class resolution, "Drupal\Component\Utility\Random" was found in both "$baseDir . '/web/core/lib/Drupal/Component/Utility/Random.php" and "/mnt/c/Users/x/d/mysite/vendor/drupal/drupal-driver/src/Drupal/Component/Utility/Random.php", the first will be used.
Removing packages services cache file:
/mnt/c/Users/x/d/mysite/vendor/drupal/console/extend.console.uninstall.services.yml
Creating packages services cache file:
/mnt/c/Users/x/d/mysite/vendor/drupal/console/extend.console.uninstall.services.yml
> DrupalProject\composer\ScriptHandler::createRequiredFiles

So Commerce does not get updated to 2.0 (I already updated all the dependencies to their latest versions.)

I thought it might be a caching issue so I ran composer clearcache and then attempted to update commerce again, but I got the same result (nothing to update).

I thought it might be an issue with the composer module list being out of date, but Commerce 2.0 was released more than 48 hours ago. So what can I do to get composer working in this case?

EDIT

My repo is based on the Drops 8 Composer repo from Pantheon, which is in turn based on drupal-composer/drupal-project.

Deleting the /vendor directory and running composer update gives me this error:

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

Changing composer.json to "drupal/core": "^8.4@RC" "symfony/css-selector": "~3.2" also results in the same error.

But, running composer install or running composer update drupal/modulename allows me to install the site and update individual modules (except Commerce) without any problem.

4
  • 1
    Is it based on the drupal-composer/drupal-project? I had some issues as well (though not the same output as yours), but I've managed to get it to work by updating the require section to include "drupal/core": "^8.4@RC", "drush/drush": "~9.0", and set "symfony/css-selector": "~3.2" in require-dev. Sep 23 '17 at 12:14
  • Try this, delete the vendor directory rm -rf vendor/ and then run composer update
    – No Sssweat
    Sep 23 '17 at 22:01
  • @NoSssweat It didn't work, unfortunately. Got a "Your requirements could not be resolved to an installable set of packages." Sep 24 '17 at 4:47
  • @Neograph734 It's based on a Pantheon repo that is in turn based on drupal-composer/drupal-project. I tried what you suggested but then I get Your requirements could not be resolved to an installable set of packages." Sep 24 '17 at 4:47
0

Thanks to @Neograph734 for pointing me in the right direction.

I needed to require Drupal 8.4-rc2 and drush 9, and then Commerce 2 arrived automatically.

Drush 9 appears to be a requirement for the 8.4 core update.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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