Closed mark-schaal closed 7 years ago
Hey @phenaproxima @grasmash @balsama any feedback on this one?
I tried a fresh install
composer create-project acquia/lightning-project:^8.1.0 lightning --no-interaction
And after that I executed:
composer require drupal/console:~1.0
And got the same error message
After running composer show symfony/css-selector
I can see 2.7.21
for that dependency
> composer show symfony/css-selector
name : symfony/css-selector
descrip. : Symfony CssSelector Component
keywords :
versions : * v2.7.21
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source : [git] https://github.com/symfony/css-selector.git 3b37ddb7b68fbb0b7595037b392347a6f60acb80
dist : [zip] https://api.github.com/repos/symfony/css-selector/zipball/3b37ddb7b68fbb0b7595037b392347a6f60acb80 3b37ddb7b68fbb0b7595037b392347a6f60acb80
names : symfony/css-selector
autoload
psr-4
Symfony\Component\CssSelector\ => .
exclude-from-classmap
requires
php >=5.3.9
@mark-schaal Starting on RC releases DrupalConsole should be installed per site.
The global executable is only a Launcher tool to find DrupalConsole installed on the site.
I defer to @jmolivas on best practices regarding global vs local/per site installation of DrupalConsole - and he indicates above that per site is preferred. I don't think lightning-project will include it in its dev dependencies until there comes a time where we use DrupalConsole for our tests or somewhere else in our development.
Either way, that leaves us with figuring out where the root of the dependency conflict is. I'm happy to loosen out constraints if needed.
@mark-schaal To avoid dependency conflicts you can add DrupalConsole when downloading the Lightning distribution by following this steps.
Instead of executing
composer create-project acquia/lightning-project:^8.1.0 lightning
Pass the --no-install
flag
composer create-project acquia/lightning-project:^8.1.0 lightning --no-install
Using
--no-install
flag will skip installation of the package dependencies
Then execute:
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader --sort-packages
This last command will add the DrupalConsole dependency to the
composer.json
file and then resolve and download Lightning + DrupalConsole.
@jmolivas I suppose the following should work for existing projects then (just adding the --no-update
flag to the require command)?
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader --sort-packages --no-update
Followed by:
composer update
@balsama I just tested and it that also works thanks. cc: @mark-schaal
Great. @mark-schaal let me know if think anything else can be clarified/documented. @jmolivas blogged about this here: https://drupalconsole.com/articles/add-drupalconsole-to-a-project-using-acquia-lightning-distribution Closing for now. Feel feee to reopen if you there is anything else.
(thanks @jmolivas !)
@balsama will be great to have this fixed out-of-the-box let me know when you have some time to test this and make changes on the dependencies of both projects.
@jmolivas I think it's your symfony/domcrawler dependency. Lightning doesn't have a specific constraint on it, but it installs 3.1.7 based on symfony/browser-kit, fapbot/goutte, and behat/mink-browserkit-driver.
Can DrupalConsole loosen/update its dom-crawler constraints? I opened a PR here: https://github.com/hechoendrupal/DrupalConsole/pull/2983
This works for me! Thanks @jmolivas and @balsama for the great clarification and the wonderful work!
@balsama You're a genius! Thank you, I was pulling out my hair until I read your comment about how to get around the issue.
I've noticed in the community that there has been divisiveness over whether to track Drupal Console in the composer file, or as a reference to a local/global installation on a machine. Is there documentation or clarification on what the latest (1.11) version of Lightning expects or how it should be integrated?
I'm seeing the following and sussing out what will be more sustainable for continued use with Lightning:
And also:
I could muddle through some dependency adjustments and sort this out for the current application we run, but I'm more interested in any vision/feedback from the engineers on where they plan on driving the integration, thanks!