pantheon-systems / drops-8

Pantheon Upstream for Drupal 8 Sites. Deprecated; please see https://github.com/pantheon-upstreams/drupal-composer-managed
GNU General Public License v2.0
80 stars 117 forks source link

Running composer require doesn't work with the 8.8 update #288

Closed ruthiepantheon closed 4 years ago

ruthiepantheon commented 4 years ago

Hello! Ruthie here from CSE.

A customer from chat reported that they cannot run "composer require" to install modules through composer in a newly created D8 site.

Here are the results:

composer require drupal/features
Using version ^3.8 for drupal/features
./composer.json has been updated
> Drupal\Composer\Composer::ensureComposerVersion
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: drupal/core[dev-master, 8.8.x-dev].
    - Can only install one of: drupal/core[8.8.x-dev, dev-master].
    - Can only install one of: drupal/core[8.8.x-dev, dev-master].
    - Installation request for drupal/core dev-master -> satisfiable by drupal/core[dev-master].
    - Installation request for drupal/core (locked at 8.8.x-dev, required as self.version) -> satisfiable by drupal/core[8.8.x-dev].

Installation failed, reverting ./composer.json to its original content.
composer require drupal/features  8.65s user 0.67s system 76% cpu 12.126 total

I've tested this out with a newly created D8 site, and i am experiencing the same thing. This happens to every module i tried to install.

Running a "composer update" fixed the issue.

I am not sure if it is supposed to be like this? The customer quoted that our upstream might be outdated so i'm trying to check if that is the case.

Thank you!

greg-1-anderson commented 4 years ago

@ruthiehallarsis Note that running composer require inside a drops-8 based site has never been supported. Customers who need to use Composer on Pantheon should follow one of these guides:

HOWEVER, in versions of Drupal prior to 8.8.0, the consequence of running composer require inside of a drops-8 site was only that dashboard upgrades became more difficult for some version releases. Since the downside was fairly minor, quite a few users have been maintaining their sites like this.

The issue you report above is a bug in 8.8.0 that prevents Composer from working with 8.8.0. I'm not sure of the workaround. composer update might not produce the expected results. Folks experimenting with the workaround should try pinning drupal/core* to ^8.8.0.

This bug will be fixed in 8.8.1. That will be next Wednesday if there is a security release, or the first Wednesday in 2020 if there is not.

ruthiepantheon commented 4 years ago

Thank you @greg-1-anderson!