Skip to content

ArgumentCountError: Too few arguments for drupal site:statistics #3416

Closed

Description

@blasvicco

ArgumentCountError: Too few arguments for drupal site:statistics

[ command:site:statistics ] 0 passed 1 expected

Problem/Motivation

Performing this command call in the console result in the next error:
ArgumentCountError: Too few arguments to function Drupal\Console\Extension\Manager::getList(), 0 passed in /private/var/www/vhost/anexusit/drupal-console/src/Command/Site/StatisticsCommand.php on line 190 and exactly 1 expected in /private/var/www/vhost/anexusit/drupal-console/src/Extension/Manager.php on line 104

Details to include:

  • We should handle the exception

How to reproduce

Calling the console command
drupal command:site:statistics

Details to include:

  • Drupal version 8.3.5.
  • Console version 1.0.0-rc23.
  • Console Launcher version 1.0.0-rc21.

Solution

Not sure

Activity

  1. miguel303 commented on Jul 14, 2017

    @miguel303
    Contributor

    @blasvicco I just ran this command: drupal site:statistics and I don't get any errors

  2. blasvicco commented on Jul 14, 2017

    @blasvicco
    ContributorAuthor

    This is the full stack of the error when I run it:
    ArgumentCountError: Too few arguments to function Drupal\Console\Extension\Manager::getList(), 0 passed in /private/var/www/vhost/anexusit/drupal-console/src/Command/Site/StatisticsCommand.php on line 190 and exactly 1 expected in /private/var/www/vhost/anexusit/drupal-console/src/Extension/Manager.php on line 104 #0 /private/var/www/vhost/anexusit/drupal-console/src/Command/Site/StatisticsCommand.php(190): Drupal\Console\Extension\Manager->getList()
    #1 /private/var/www/vhost/anexusit/drupal-console/src/Command/Site/StatisticsCommand.php(103): Drupal\Console\Command\Site\StatisticsCommand->getModuleCount(true)
    #2 /private/var/www/vhost/anexusit/drupal8.dev/vendor/symfony/console/Command/Command.php(266): Drupal\Console\Command\Site\StatisticsCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #3 /private/var/www/vhost/anexusit/drupal8.dev/vendor/symfony/console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #4 /private/var/www/vhost/anexusit/drupal8.dev/vendor/symfony/console/Application.php(203): Symfony\Component\Console\Application->doRunCommand(Object(Drupal\Console\Command\Site\StatisticsCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #5 /private/var/www/vhost/anexusit/drupal-console-core/src/Application.php(146): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #6 /private/var/www/vhost/anexusit/drupal-console/src/Application.php(71): Drupal\Console\Core\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #7 /private/var/www/vhost/anexusit/drupal8.dev/vendor/symfony/console/Application.php(127): Drupal\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #8 /private/var/www/vhost/anexusit/drupal-console/bin/drupal.php(84): Symfony\Component\Console\Application->run()
    #9 phar:///usr/local/bin/drupal/src/Utils/Launcher.php(30): include_once('/private/var/ww...')
    #10 phar:///usr/local/bin/drupal/bin/drupal.php(71): Drupal\Console\Launcher\Utils\Launcher->launch(Object(Drupal\Console\Core\Utils\DrupalFinder))
    #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}
    ArgumentCountError: Too few arguments to function Drupal\Console\Extension\Manager::getList(), 0 passed in /private/var/www/vhost/anexusit/drupal-console/src/Command/Site/StatisticsCommand.php on line 190 and exactly 1 expected in Drupal\Console\Extension\Manager->getList() (line 104 of /private/var/www/vhost/anexusit/drupal-console/src/Extension/Manager.php).

  3. hjuarez20 commented on Jun 27, 2019

    @hjuarez20
    Contributor

    This issue is no longer present using the version 1.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions