I'm really tired of having composer issue after drupal self-update.
OK, I've done:
drupal self-update.
After update I got notification that I have no console install at all:
[ERROR] Drupal Console is not installed at: path/to/my/drupal/site.
I should install console again via composer also:
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
But upon installation I'm getting:
Your requirements could not be resolved to an installable set of packages.
Problem 1 - Conclusion: don't install drupal/console 1.0.0-rc3 - Conclusion: don't install drupal/console 1.0.0-rc2 - Conclusion: don't install drupal/console 1.0.0-rc1 - Conclusion: don't install drupal/console 1.0.0-beta5 - Conclusion: don't install drupal/console 1.0.0-beta4 - Conclusion: don't install drupal/console 1.0.0-beta3 - Conclusion: don't install drupal/console 1.0.0-beta2 - Conclusion: don't install drupal/console 1.0.0-beta1 - Conclusion: don't install drupal/console 1.0.0-alpha2 - Conclusion: remove symfony/dom-crawler v3.1.4 - Installation request for drupal/console ~1.0 -> satisfiable by drupal/console[1.0.0-alpha1, 1.0.0-alpha2, 1.0.0-beta1, 1.0.0-beta2, 1.0.0-beta3, 1.0.0-beta4, 1.0.0-beta5, 1.0.0-rc1, 1.0.0-rc2, 1.0.0-rc3]. - Conclusion: don't install symfony/dom-crawler v3.1.4 - drupal/console 1.0.0-alpha1 requires symfony/dom-crawler ~2.8 -> satisfiable by symfony/dom-crawler[2.8.x-dev, v2.8.0, v2.8.0-BETA1, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9]. - Can only install one of: symfony/dom-crawler[2.8.x-dev, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.0, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.0-BETA1, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.1, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.10, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.11, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.12, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.2, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.3, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.4, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.5, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.6, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.7, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.8, v3.1.4]. - Can only install one of: symfony/dom-crawler[v2.8.9, v3.1.4]. - Installation request for symfony/dom-crawler (locked at v3.1.4) -> satisfiable by symfony/dom-crawler[v3.1.4].
WTF? Why a big part of my development is solving problems is not related to my business logic at all? :(
Why the hell I was able to install console first time?
@drupality Finding errors on composer could be challenging, I take a look at your issue and this is what is happening
Starting on DC-RC-1
- The project was broken into the global executable the one you use to as shortcut to type
drupalthe same one you update by usingself-update. - And the one you must need to install per site. This was done to try to minimize dependency conflicts and support multiple releases of Drupal, as we all know 8.2 is just around the corner.
How to fix this issue using composer commands
- Find what exact version of the offending component by
> composer show symfony/dom-crawler
name : symfony/dom-crawler
descrip. : Symfony DomCrawler Component
keywords :
versions : * v3.1.4
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source : [git] https://github.com/symfony/dom-crawler.git bb7395e8b1db3654de82b9f35d019958276de4d7
dist : [zip] https://api.github.com/repos/symfony/dom-crawler/zipball/bb7395e8b1db3654de82b9f35d019958276de4d7 bb7395e8b1db3654de82b9f35d019958276de4d7
names : symfony/dom-crawler
autoload
psr-4
Symfony\Component\DomCrawler\ => .
exclude-from-classmap
requires
php >=5.5.9
symfony/polyfill-mbstring ~1.0
requires (dev)
symfony/css-selector ~2.8|~3.0
suggests
symfony/css-selector
- See who is requesting the component by
> composer why symfony/dom-crawler
behat/mink-browserkit-driver v1.3.2 requires symfony/dom-crawler (~2.3|~3.0)
fabpot/goutte v3.1.2 requires symfony/dom-crawler (~2.1|~3.0)
symfony/browser-kit v3.1.4 requires symfony/dom-crawler (~2.8|~3.0)
- See which versions are installed for the rest of the
symfonycomponents by
composer show | grep symfony/
symfony/browser-kit v3.1.4 Symfony BrowserKit Component
symfony/class-loader v2.8.11 Symfony ClassLoader Component
symfony/console v2.8.11 Symfony Console Component
symfony/css-selector v2.8.11 Symfony CssSelector Component
symfony/debug v2.8.11 Symfony Debug Component
symfony/dependency-injection v2.8.11 Symfony DependencyInjection Component
symfony/dom-crawler v3.1.4 Symfony DomCrawler Component
symfony/event-dispatcher v2.8.11 Symfony EventDispatcher Component
symfony/finder v2.8.11 Symfony Finder Component
symfony/http-foundation v2.8.11 Symfony HttpFoundation Component
symfony/http-kernel v2.8.11 Symfony HttpKernel Component
symfony/polyfill-apcu v1.2.0 Symfony polyfill backporting apcu_* functions to lower PHP ...
symfony/polyfill-iconv v1.2.0 Symfony polyfill for the Iconv extension
symfony/polyfill-mbstring v1.2.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php54 v1.2.0 Symfony polyfill backporting some PHP 5.4+ features to lowe...
symfony/polyfill-php55 v1.2.0 Symfony polyfill backporting some PHP 5.5+ features to lowe...
symfony/process v2.8.11 Symfony Process Component
symfony/psr-http-message-bridge v0.2 PSR HTTP message bridge
symfony/routing v2.8.11 Symfony Routing Component
symfony/serializer v2.8.11 Symfony Serializer Component
symfony/translation v2.8.11 Symfony Translation Component
symfony/validator v2.8.11 Symfony Validator Component
symfony/var-dumper v2.8.11 Symfony mechanism for exploring and dumping PHP variables
symfony/yaml v2.8.4 Symfony Yaml Component
- Require an specific version of a component by:
> composer require symfony/dom-crawler:2.8.11
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/dom-crawler (v3.1.4)
- Installing symfony/dom-crawler (v2.8.11)
Loading from cache
Writing lock file
Generating autoload files
> DrupalProject\composer\ScriptHandler::createRequiredFiles
- Now is possible to Install DrupalConsole
> composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing symfony/expression-language (v2.8.12)
Loading from cache
- Installing stecman/symfony-console-completion (0.5.1)
Loading from cache
- Installing phpseclib/phpseclib (2.0.4)
Loading from cache
- Installing padraic/humbug_get_contents (1.0.4)
Loading from cache
- Installing padraic/phar-updater (1.0.3)
Loading from cache
- Installing gabordemooij/redbean (v4.3.2)
Loading from cache
- Installing symfony/filesystem (v2.8.12)
Loading from cache
- Installing symfony/config (v2.8.12)
Loading from cache
- Installing drupal/console-en (1.0.0-rc1)
Loading from cache
- Installing dflydev/placeholder-resolver (v1.0.2)
Loading from cache
- Installing dflydev/dot-access-data (v1.0.1)
Loading from cache
- Installing dflydev/dot-access-configuration (v1.0.1)
Loading from cache
- Installing drupal/console-core (1.0.0-rc4)
Loading from cache
- Installing alchemy/zippy (0.3.5)
Loading from cache
- Installing drupal/console (1.0.0-rc4)
Loading from cache
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
alchemy/zippy suggests installing guzzle/guzzle (To use the GuzzleTeleporter)
Writing lock file
Generating optimized autoload files
> DrupalProject\composer\ScriptHandler::createRequiredFiles
- Confirm you have the latest version
> composer show | grep drupal/console
drupal/console 1.0.0-rc4 The Drupal Console is a CLI tool to generate boilerplate ...
drupal/console-core 1.0.0-rc4 Drupal Console Core
drupal/console-en 1.0.0-rc1 Drupal Console English Language
Avoid composer issues:
Is posible to try avoiding this depende conflicts by downloading Drupal + DrupalConsole using composer and the awesome DrupalComposer project executing:
composer create-project \
drupal-composer/drupal-project:8.x-dev \
drupal-composer-project.dev \
--prefer-dist \
--no-progress \
--no-interaction
This composer template will install Drupal + DrupalConsole one the same command and then composer will try to fix any possible issue between component dependencies.
Thanks! I ran these commands
composer require symfony/dom-crawler:2.8.11
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
composer show | grep drupal/console
It shows I have the latest version. I no longer get the original error message. But now I get this message:
> drupal list
[Symfony\Component\Console\Exception\RuntimeException]
The "--shellexec_output" option does not exist.
@robertloo try editing your ~/.console/config.yml file and removing the offending last line.
I removed the line shellexec_output: true from file ~/.console/config.yml
That fixed it. Thanks! 👍
@robertloo thanks, I had same error.
@jmolivas thanks a lot for detail explanation.
@drupality We will appreciated if we can avoid comment like this...
WTF? Why a big part of my development is solving problems is not related to my business logic at all? :(
This is an open source project, this is not a paid product. I understand you are frustrated but understand that comment like this is very very insulting for people that spend hours and hours for a project that is free.
You should consider reading this page Drupal Code of Conduct.
@darol100 yea, you are totally right, sorry about that
I'm maintaining a fork of https://github.com/drupal-composer/drupal-project and I've also been hit by this issue. Why is DrupalConsole depending on https://github.com/symfony/dom-crawler ~2.8 while core 8.1.x uses ~2.7?
I looked at the commit that caused this change, but it is a jumble of unrelated changes, and there is no mention there of why this change is needed: https://github.com/hechoendrupal/DrupalConsole/commit/c8232e025df41c18566c87c0bfa1d172780e408a
I think it's not a good idea to depend on different versions than core does, unless you also run the full core test suite to ensure there are no regressions.
For the moment this requires me to stick with DrupalConsole 0.11.3 which is still compatible with core 8.1.x.
Drupal 8.2.1 is also still on dom-crawler 2.7.6 by the way.
@pfrenssen fixed with https://github.com/hechoendrupal/DrupalConsole/pull/2806/files#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780R45
This will be available on next release rc-6
Great, thanks!
I created a new Drupal project and drupal console did not work there. I did everything which is mentioned in this channel. The problem is not fixed for me. Now I have console installed both with phar and composer.
I am still getting
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
composer update drupal/console --with-dependencies
great thanks, save my time, hope new version fix dependencies problem.
@milkovsky did you tried this https://github.com/hechoendrupal/DrupalConsole#download-as-new-dependency ?
Note: for anyone reading this as a solution check the version numbers.
As of November 2016 its composer require symfony/dom-crawler:2.8.13