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

[console] Problems with versions in dependency symfony/css-selector

Open davidjguru opened this issue 3 years ago • 0 comments

[console] Problems with versions in dependency symfony/css-selector

Problem/Motivation

When I was working with Varbase for Drupal 9 I found problems in the installation of Drupal Console due to a conflict with dependency versions.

Details to include:

  • I was installing Varbase with Drupal 9 when after the build of the codebase, I added a simply order to download Drupal Console last version (1.9.5) with Drupal 9 Support, but I got an error from conflicts in versions, just this:
$ ddev composer require drupal/console:^1.9.5
   ./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
    - Installation request for drupal/console ^1.9.5 -> satisfiable by drupal/console[1.9.5].
    - Conclusion: remove symfony/css-selector v5.1.7
    - Conclusion: don't install symfony/css-selector v5.1.7
    - drupal/console 1.9.5 requires symfony/css-selector ~3.0|~4.0

This conflict exists due to a former version of symfony/css-selector previously installed as dependency, from the chain: $ composer depends symfony/css-selector tijsverkoyen/css-to-inline-styles 2.2.3 requires symfony/css-selector (^2.7 || ^3.0 || ^4.0 || ^5.0) $ composer depends tijsverkoyen/css-to-inline-styles drupal/swiftmailer 2.0.0-beta1 requires tijsverkoyen/css-to-inline-styles (^2.2) $ composer depends drupal/swiftmailer drupal/varbase_email 9.0.0-alpha1 requires drupal/swiftmailer (~2.0)

So, from varbase_email contrib module to symfony/css-selector. The installed versions of symfony/css-selector stays like that:

$ composer show  symfony/css-selector             
    name     : symfony/css-selector
    descrip. : Symfony CssSelector Component
    keywords : 
    versions : * v5.1.7
    type     : library
    license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
    homepage : https://symfony.com
   source   : [git] https://github.com/symfony/css-selector.git e544e24472d4c97b2d11ade7caacd446727c6bf9
   dist     : [zip] https://api.github.com/repos/symfony/css-selector/zipball/e544e[...]
   path     : /var/www/html/vendor/symfony/css-selector
   names    : symfony/css-selector
   autoload psr-4
  Symfony\Component\CssSelector\ => . exclude-from-classmap
  requires  php >=7.2.5

How to reproduce

$ ddev config --project-type=drupal9 --docroot=docroot --create-docroot $ echo y | ddev composer create Vardot/varbase-project:9.0.0-alpha1 $ ddev composer require --dev drupal/console

Details to include:

  • Drupal version: 9.0.7
  • Console version: 1.9.7
  • PHP Version: 7.3.20-1+0~20200710.65+debian10~1.gbpc9cbeb
  • DDEV version: 1.15.3

Solution

Well, I'm thinking about changing the version of the resource symfony/css-selector (locked at v5.1.7 in my system). Is it possible to advance the version set for this dependency from the Drupal Console side?

davidjguru avatar Oct 22 '20 18:10 davidjguru