For days I'm trying to install Drupal 8.2.1 with Drupal-Console -without any success.
Trying to install drupal/console:~1.0 leads to
Problem 1
- Conclusion: don't install drupal/console 1.0.0-rc6
- Conclusion: don't install drupal/console 1.0.0-rc5
- Conclusion: don't install drupal/console 1.0.0-rc4
- 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: don't install symfony/dom-crawler v2.8.12
- Conclusion: remove symfony/dom-crawler v3.1.5
- Conclusion: don't install symfony/dom-crawler v2.8.7|keep symfony/dom-crawler v3.1.5
- Conclusion: don't install symfony/dom-crawler v2.8.8|keep symfony/dom-crawler v3.1.5
- Conclusion: don't install symfony/dom-crawler v2.8.9|keep symfony/dom-crawler v3.1.5
- Conclusion: don't install symfony/dom-crawler v2.8.10|keep symfony/dom-crawler v3.1.5
- Conclusion: don't install symfony/dom-crawler v2.8.11|keep symfony/dom-crawler v3.1.5
- Conclusion: don't install symfony/dom-crawler v2.8.6
- 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, 1.0.0-rc4, 1.0.0-rc5, 1.0.0-rc6].
- Conclusion: don't install symfony/dom-crawler v3.1.5
- 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.5].
- Can only install one of: symfony/dom-crawler[v2.8.0, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.0-BETA1, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.1, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.2, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.3, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.4, v3.1.5].
- Can only install one of: symfony/dom-crawler[v2.8.5, v3.1.5].
- Installation request for symfony/dom-crawler (locked at v3.1.5) -> satisfiable by symfony/dom-crawler[v3.1.5].
Drupal-Console requires (composer.json):
`"symfony/dom-crawler": "~2.7|~2.8"``
What can I do to get an Console version functioning with symfony/dom-crawler": ">=2.7|~3.1" ?
To get Console installed I tried
composer require symfony/dom-crawler:2.8
followed by
composer require drupal/console:~1.0@rc --prefer-dist --optimize-autoloader
That leads to
$ cd web
$ drupal init
InvalidArgumentException: The file "/var/www/proj/drupal/web//vendor/drupal/console-core//services.yml" does not exist. in phar:///usr/local/bin/drupal/vendor/symfony/config/FileLocator.php on line 44 #0 phar:///usr/local/bin/drupal/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php(42): Symfony\Component\Config\FileLocator->locate('/var/www/drupal...')
#1 phar:///usr/local/bin/drupal/vendor/drupal/console-core/src/Bootstrap/DrupalConsoleCore.php(35): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->load('/var/www/drupal...')
#2 /var/www/proj/drupal/vendor/drupal/console/src/Bootstrap/Drupal.php(81): Drupal\Console\Bootstrap\DrupalConsoleCore->boot()
#3 /var/www/proj/drupal/vendor/drupal/console/bin/drupal.php(55): Drupal\Console\Bootstrap\Drupal->boot()
#4 phar:///usr/local/bin/drupal/src/Utils/Launcher.php(32): include_once('/var/www/drupal...')
#5 phar:///usr/local/bin/drupal/bin/drupal.php(64): Drupal\Console\Utils\Launcher->launch('/var/www/drupal...')
#6 phar:///usr/local/bin/drupal/bin/drupal(3): require('phar:///usr/loc...')
#7 /usr/local/bin/drupal(10): require('phar:///usr/loc...')
#8 {main}
InvalidArgumentException: The file "/var/www/proj/drupal/web//vendor/drupal/console-core//services.yml" does not exist. in Symfony\Component\Config\FileLocator->locate() (line 44 of phar:///usr/local/bin/drupal/vendor/symfony/config/FileLocator.php).
Why is ./vendor/drupal/console-core/ no requested in web subdir instead in the parent drupal dir?
@ksicon can try the solution at https://github.com/hechoendrupal/DrupalConsole/issues/2770#issuecomment-254130536 ?
How I fixed this:
Try it at your own risk :).
I'm having the same problem as originally posted by @ksicon.
It seems that Drupal Console does not work with symfony/dom-crawler:~3.1, but my installation of Drupal 8.2.x does not work with symfony/dom-crawler:~2.8.
The solution @jmolivas pointed to in #2770 does not apply to my installation.
I tired what @mfernea recommended, but that did not work for me.
When I try @mfernea's recommendation or when I explicitly run composer require symfony/browser-kit:~2.8; composer require symfony/dom-crawler:~2.8, I can then sucessfully install Drupal Console, but then I end up with the following:
% drupal site
PHP Fatal error: Interface 'Symfony\Cmf\Component\Routing\RouteProviderInterface' not found in /d8/core/lib/Drupal/Core/Routing/RouteProviderInterface.php on line 12
Fatal error: Interface 'Symfony\Cmf\Component\Routing\RouteProviderInterface' not found in /d8/core/lib/Drupal/Core/Routing/RouteProviderInterface.php on line 12
And:
% drush8
ReflectionException: Class Symfony\Cmf\Component\Routing\NestedMatcher\NestedMatcher does not exist in /d8/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php:86
This is for an existing site using Drupal 8.2.2 and Drupal Console 1.0.0-rc8 that has a couple of additional libraries installed.
It seems to be okay on a basic Drupal 8.2.2 (and 8.1.10) install.
So maybe one of the additional libraries is requiring the newer version of symfony/dom-crawler to work? However, when I removed all additional libraries, I got the same results as above, so I don't see where that is happening.
Any pointers anyone might have (commands to try, documents to read, etc.), are greatly appreciated.
@oadaeh did you tried this? https://github.com/hechoendrupal/DrupalConsole/issues/2754#issuecomment-251361912
Yes, I did. I did those steps, and Drupal Console does install. After that however, is when I get the errors I posted (one of which has some similarity to #2881).
(I also now see that I should have posted in one of the other two issues, but they didn't show up in my search.)
This issue is still keeping me from installing Drupal Console with Drupal 8.2.5. Any Progress on this?
I'm surprised that not more people are having trouble with this. Do most people install Console without composer?
Hello,
If any one installed DrupalConsole for Drupal-8.2.5 using Composer.
The solution is not the best one but it works "php vendor/drupal/console/bin/drupal.php list".
You can still symlink that file and use it locally.
Thanks
I had this same issue and ended up installing using via the Drupal Console Launcher: https://github.com/hechoendrupal/drupal-console#install-drupal-console-launcher
Followed the instructions there and it worked.
Scratch that.. tried it within my D8 project and still get the same complaints.
Try requiring using the --no-update flag to disable automatic upding dependencies.
composer require drupal/console:~1.0 \
--prefer-dist \
--optimize-autoloader \
--sort-packages \
--no-update
And then execute the following composer command to update project dependencies.
composer update
The same issue appears with symfony/css-selector due to behat/mink having the dependency on symfony/css-selector (~2.1|~3.0)
If you run the following commands in this order it'll fix it:
composer require --dev symfony/css-selector:~2.7
composer require --dev symfony/dom-crawler:~2.7
composer require --dev drupal/console
Is there any reason drupal/console couldn't be upgraded to use (~2.8|~3.0) of both of these libraries?
This issue is resolved with this comment https://github.com/hechoendrupal/drupal-console/issues/2842#issuecomment-279245126
Most helpful comment
Try requiring using the
--no-updateflag to disable automatic upding dependencies.And then execute the following composer command to update project dependencies.