hechoendrupal / drupal-console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
http://drupalconsole.com
GNU General Public License v2.0
939 stars 558 forks source link

[console] Too few arguments to function Drupal\Console\Generator\DatabaseSettingsGenerator::__construct() #4228

Open guardiola86 opened 4 years ago

guardiola86 commented 4 years ago

Too few arguments to function Drupal\Console\Generator\DatabaseSettingsGenerator::__construct()

Problem/Motivation

When running any drupal console command I get this error:

`**ArgumentCountError: Too few arguments to function Drupal\Console\Generator\DatabaseSettingsGenerator::construct(), 0 passed and exactly 1 expected in /home/vagrant/.console/extend/vendor/drupal/console/src/Generator/DatabaseSettingsGenerator.php on line 25 #0 [internal function]: Drupal\Console\Generator\DatabaseSettingsGenerator->construct()

1 /vagrant/repos/charged/vendor/symfony/dependency-injection/ContainerBuilder.php(1176): ReflectionClass->newInstanceArgs(Array)

2 /vagrant/repos/charged/vendor/symfony/dependency-injection/ContainerBuilder.php(634): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'console.databas...')

3 /vagrant/repos/charged/vendor/symfony/dependency-injection/ContainerBuilder.php(588): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('console.databas...', 1)

4 /home/vagrant/.console/extend/vendor/drupal/console-core/src/Application.php(500): Symfony\Component\DependencyInjection\ContainerBuilder->get('console.databas...')

5 /home/vagrant/.console/extend/vendor/drupal/console-core/src/Application.php(210): Drupal\Console\Core\Application->registerGenerators()

6 /home/vagrant/.console/extend/vendor/drupal/console-core/src/Application.php(116): Drupal\Console\Core\Application->loadCommands()

7 /home/vagrant/.console/extend/vendor/drupal/console/src/Application.php(64): Drupal\Console\Core\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

8 /home/vagrant/.console/extend/vendor/symfony/console/Application.php(125): Drupal\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

9 /vagrant/repos/charged/vendor/drupal/console/bin/drupal.php(89): Symfony\Component\Console\Application->run()

10 /vagrant/repos/charged/vendor/drupal/console/bin/drupal(4): require('/vagrant/repos/...')

11 {main}

ArgumentCountError: Too few arguments to function Drupal\Console\Generator\DatabaseSettingsGenerator::construct(), 0 passed and exactly 1 expected in Drupal\Console\Generator\DatabaseSettingsGenerator->construct() (line 25 of /home/vagrant/.console/extend/vendor/drupal/console/src/Generator/DatabaseSettingsGenerator.php).**`

Details to include: drupal/console version: 1.9.4 php version: 7.2.14 drupal/core version: 8.7.11

How to reproduce

Use versions above, run composer install/composer update, then run command: drupal

guardiola86 commented 4 years ago

Has anyone had this issue?