Does not work with Drupal Composer Project
I use 'drupal-composer/drupal-project'.
I perform 'drupal' inside a website folder and I have:
Recoverable fatal error: Argument 1 passed to Drupal\Console\Command\Site\DebugCommand::__construct() must be an instance of Drupal\Console\Utils\ConfigurationManager, instance of Drupal\Console\Utils\Site given in phar:///usr/local/bin/drupal/vendor/drupal/console-core/src/Command/Site/DebugCommand.php on line 39 #0 /var/www/drupalvm/mysite/web/core/includes/bootstrap.inc(548): _drupal_error_handler_real(4096, 'Argument 1 pass...', 'phar:///usr/loc...', 39, Array)
#1 phar:///usr/local/bin/drupal/vendor/drupal/console-core/src/Command/Site/DebugCommand.php(39): _drupal_error_handler(4096, 'Argument 1 pass...', 'phar:///usr/loc...', 39, Array)
#2 [internal function]: Drupal\Console\Command\Site\DebugCommand->__construct(Object(Drupal\Console\Utils\Site), Object(Drupal\Console\Utils\ConfigurationManager))
#3 phar:///usr/local/bin/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php(928): ReflectionClass->newInstanceArgs(Array)
#4 phar:///usr/local/bin/drupal/vendor/symfony/dependency-injection/ContainerBuilder.php(468): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), 'console.site_de...')
#5 /var/www/drupalvm/mysite/vendor/drupal/console/src/Application.php(143): Symfony\Component\DependencyInjection\ContainerBuilder->get('console.site_de...')
#6 /var/www/drupalvm/mysite/vendor/drupal/console/src/Application.php(38): Drupal\Console\Application->registerCommands()
#7 phar:///usr/local/bin/drupal/vendor/symfony/console/Application.php(124): Drupal\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/drupalvm/mysite/vendor/drupal/console/bin/drupal.php(70): Symfony\Component\Console\Application->run()
#9 phar:///usr/local/bin/drupal/src/Utils/Launcher.php(28): include_once('/var/www/drupal...')
#10 phar:///usr/local/bin/drupal/bin/drupal.php(87): Drupal\Console\Utils\Launcher->launch('/var/www/drupal...')
#11 phar:///usr/local/bin/drupal/bin/drupal(3): require('phar:///usr/loc...')
#12 /usr/local/bin/drupal(10): require('phar:///usr/loc...')
#13 {main}
Recoverable fatal error: Argument 1 passed to Drupal\Console\Command\Site\DebugCommand::__construct() must be an instance of Drupal\Console\Utils\ConfigurationManager, instance of Drupal\Console\Utils\Site given in Drupal\Console\Command\Site\DebugCommand->__construct() (line 39 of phar:///usr/local/bin/drupal/vendor/drupal/console-core/src/Command/Site/DebugCommand.php).
What is the problem?
@ArtuGit which version of the project do you have installed?
@ArtuGit can you confirm you are using DC RC12 on the site and the launcher?
@jmolivas Yes, Drupal Console Launcher version 1.0.0-rc12
And "drupal/console": "~1.0" in the composer.json (of the Drupal Composer Project)
try executing within your site then copy/paste results please
composer show | grep drupal/console
drupal/console 1.0.0-rc10 The Drupal CLI. A tool to generate b... drupal/console-core 1.0.0-rc10 Drupal Console Core drupal/console-en 1.0.0-rc9 Drupal Console English Language
Try updating executing:
composer update drupal/console
Now I have drupal/console 1.0.0-rc11 and a message:
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
You have requested a non-existent service "console.chain_discovery".
@ArtuGit can you try updating both (site and launcher) to latest RC-13
How can I do it correctly (for the both)?
@ArtuGit https://gist.github.com/jmolivas/a0970e1ea252ecb852fe8c7182d85d3e
@jmolivas, thanks.
After 'drupal self-update' I have: [OK] Updated from version "1.0.0-rc12" to version "1.0.0-rc13".
When I perform 'drupal' inside the website folder I have:
PHP Fatal error: Trait 'Drupal\Console\Command\Shared\InputTrait' not found in /var/www/drupalvm/mysite/vendor/drupal/console/src/Command/Generate/ControllerCommand.php on line 32
Fatal error: Trait 'Drupal\Console\Command\Shared\InputTrait' not found in /var/www/drupalvm/mysite/vendor/drupal/console/src/Command/Generate/ControllerCommand.php on line 32
((
@ArtuGit did you updated DC within the site too? execute this form the site root and copy/paste the output.
composer show | grep drupal/console
@jmolivas There is 'Nothing to install or update". Currently, I still have:
drupal/console 1.0.0-rc11 The Drupal CLI. A tool to generate boilerplate code... drupal/console-core 1.0.0-rc10 Drupal Console Core drupal/console-en 1.0.0-rc9 Drupal Console English Language
@ArtuGit Latest release is RC-13 not sure why executing form your site root composer update drupal/console or composer update drupal/console --with-dependencies does not update your site. Maybe you have a fixed version presented at your composer.json file
update drupal/console --with-dependencies works and now drupal works too!
Thank you a lot. ))
drupal/console 1.0.0-rc13 The Drupal CLI. A tool to generate boilerplate c... drupal/console-core 1.0.0-rc13 Drupal Console Core drupal/console-en 1.0.0-rc13 Drupal Console English Language
Hi, I am getting this error
Fatal error: Cannot use Drupal\Console\Core\Bootstrap\DrupalConsoleCore as DrupalConsoleCore because the name is already in use
with
drupal/console 1.0.0-rc16 drupal/console-core 1.0.0-rc16 drupal/console-en 1.0.0-rc16
@mmwebaze what are your OS and PHP versions?
@jmolivas thanks I was able to finally resolve the issue.
@mmwebaze do you mind to share how did you fix it?