drupal/core-dev install fails if drush/drush already installed

Created on 27 March 2020, over 4 years ago
Updated 8 July 2024, 6 months ago

If you install drupal/core-dev after drush/drush in Drupal 8.8.4, it fails with this message:

Your requirements could not be resolved to an installable set of packages.

Since this might have to be solved in Drush, the corresponding Drush issue is Can only install drupal/core-dev before Drush.

It looks like symfony/filesystem for drupal/core-dev 8.8.x has been pinned at ~3.4.0 ("symfony/filesystem": "~3.4.0") but Drupal 8.8.4 is using 4.4.5.

Drupal 8.8.4 installation

$ composer show symfony/filesystem
name     : symfony/filesystem
descrip. : Symfony Filesystem Component
keywords : 
versions : * v4.4.5
...

Trying to install drupal/core-dev

$ composer require drupal/core-dev
Using version ^8.8 for drupal/core-dev
./composer.json has been updated
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
    - Conclusion: don't install drupal/core-dev 8.8.4
    - Conclusion: don't install drupal/core-dev 8.8.3
    - Conclusion: don't install drupal/core-dev 8.8.2
    - Conclusion: don't install drupal/core-dev 8.8.1
    - Conclusion: don't install drupal/core-dev 8.8.0
    - Conclusion: don't install drupal/core-dev 8.8.0-rc1
    - Conclusion: don't install drupal/core-dev 8.9.0-beta1
    - Conclusion: don't install drupal/core-dev 8.8.0-beta1
    - drupal/core-dev 8.8.0-alpha1 requires drupal/core 8.8.0-alpha1 -> satisfiable by drupal/core[8.8.0-alpha1].
    - Conclusion: don't install drupal/core 8.8.0-alpha1
    - Conclusion: don't install drupal/core-dev 8.9.x-dev
    - Conclusion: remove symfony/filesystem v4.4.5
    - Installation request for drupal/core (locked at 8.8.4) -> satisfiable by drupal/core[8.8.4].
    - Installation request for drupal/core-dev ^8.8 -> satisfiable by drupal/core-dev[8.8.0, 8.8.0-alpha1, 8.8.0-beta1, 8.8.0-rc1, 8.8.1, 8.8.2, 8.8.3, 8.8.4, 8.8.x-dev, 8.9.0-beta1, 8.9.x-dev].
    - Conclusion: don't install symfony/filesystem v4.4.5
    - drupal/core-dev 8.8.x-dev requires symfony/filesystem ~3.4.0 -> satisfiable by symfony/filesystem[3.4.x-dev, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.15, v3.4.16, v3.4.17, v3.4.18, v3.4.19, v3.4.2, v3.4.20, v3.4.21, v3.4.22, v3.4.23, v3.4.24, v3.4.25, v3.4.26, v3.4.27, v3.4.28, v3.4.29, v3.4.3, v3.4.30, v3.4.31, v3.4.32, v3.4.33, v3.4.34, v3.4.35, v3.4.36, v3.4.37, v3.4.38, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9].
    - Can only install one of: symfony/filesystem[3.4.x-dev, v4.4.5].
    - Can only install one of: symfony/filesystem[v3.4.0, v4.4.5].
    - Can only install one of: symfony/filesystem[v3.4.0-BETA1, v4.4.5].
...
    - Can only install one of: symfony/filesystem[v3.4.9, v4.4.5].
    - Installation request for symfony/filesystem (locked at v4.4.5) -> satisfiable by symfony/filesystem[v4.4.5].

Installation failed, reverting ./composer.json to its original content.
πŸ› Bug report
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
DocumentationΒ  β†’

Last updated 1 day ago

No maintainer
Created by

πŸ‡©πŸ‡°Denmark ressa Copenhagen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Closed: won't fix almost 2 years ago
  • πŸ‡ΊπŸ‡¦Ukraine gilmord πŸ‡ΊπŸ‡¦Ukraine

    This happens to me also on core 8.9.20

    It is not a big problem, as I only used Drupal 8 to run Upgrade Status module, and it is solved by removing drush, installing dev-core and installing drush back.
    But it can be reproduced, so "cannot reproduce" is not a correct status here, also the user who put "cannot reproduce" status used Drupal 10 and the issue is reported on Drupal 8.

  • Status changed to Active almost 2 years ago
  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    This is still happening in the latest Drupal 9.5 version (see installing drush before drupal/core-dev breaks the project #5372), so setting status back to "Active".

  • Status changed to Postponed: needs info almost 2 years ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    In the drush issue linked in #15 greg-1-anderson recommends, that

    Recommended Strategy: Composer works best if you install projects with highly specific dependencies, like drupal/core-dev before projects like drush/drush that have loose dependencies that allow it to work in a lot of different environments.

    So, it appears that this is a documentation issue for Drupal. And Drupal documentation β†’ has been updated.

    What else is left to do here?

  • πŸ‡¬πŸ‡§United Kingdom smaz England, UK

    I've just run into this when working on Drupal 9 - removing drush (composer remove drush/drush), requiring core-dev then re-adding drush works fine & gets around the issue. I'm not sure there's anything core needs to do here, though perhaps the documentation could suggest to remove & re-add drush.

    I've just tried this without specifying a Drupal version for the recommended project (so currently uses D10), and was able to install drush before core-dev without any issues, so perhaps this is specifically an issue with D8/D9.

  • Status changed to Closed: outdated 6 months ago
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    Based on #17 I think this can be closed, given that Drupal 9 is no longer supported and no one has reported issues with Drupal 10.

Production build 0.71.5 2024