After I updated my site to Drupal 8.9.16 and Drush to 10.5.0 I get the following error PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function
when running any Drush command. This only happens on my remote site not on my local site.
The site is still working ok so I was able to clear cache and update the database from the backend of Drupal. I was hoping this would fix the problem but it didn’t. I also searched for a solution but none of the topics I found got me the right solution.
Hopefully one of you have a better understanding of what this error means, and can help me fix it.
The full error message is:
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function DrushApplication::configureAndRegisterCommands(), 3 passed in /home/user/domains/domain.com/public_html/vendor/drush/drush/src/Runtime/Runtime.php on line 113 and exactly 4 expected in /home/user/domains/domain.com/vendor/drush/drush/src/Application.php:313 Stack trace: #0 /home/user/domains/domain.com/public_html/vendor/drush/drush/src/Runtime/Runtime.php(113): DrushApplication->configureAndRegisterCommands(Object(DrushSymfonyDrushArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput), Array) #1 /home/user/domains/domain.com/public_html/vendor/drush/drush/src/Runtime/Runtime.php(49): DrushRuntimeRuntime->doRun(Array, Object(SymfonyComponentConsoleOutputConsoleOutput)) #2 /home/user/domains/domain.com/public_html/vendor/drush/drush/drush.php(72): DrushRuntimeRuntime->run(Array) #3 /home/user/domains/domain.com/public_html/vendor/drush/drush/drush(4): require('/home/deb in /home/user/domains/domain.com/vendor/drush/drush/src/Application.php on line 313 Fatal error: Uncaught ArgumentCountError: Too few arguments to function DrushApplication::configureAndRegisterCommands(), 3 passed in /home/user/domains/domain.com/public_html/vendor/drush/drush/src/Runtime/Runtime.php on line 113 and exactly 4 expected in /home/user/domains/domain.com/vendor/drush/drush/src/Application.php:313 Stack trace: #0 /home/user/domains/domain.com/public_html/vendor/drush/drush/src/Runtime/Runtime.php(113): DrushApplication->configureAndRegisterCommands(Object(DrushSymfonyDrushArgvInput), Object(SymfonyComponentConsoleOutputConsoleOutput), Array) #1 /home/user/domains/domain.com/public_html/vendor/drush/drush/src/Runtime/Runtime.php(49): DrushRuntimeRuntime->doRun(Array, Object(SymfonyComponentConsoleOutputConsoleOutput)) #2 /home/user/domains/domain.com/public_html/vendor/drush/drush/drush.php(72): DrushRuntimeRuntime->run(Array) #3 /home/user/domains/domain.com/public_html/vendor/drush/drush/drush(4): require('/home/deb in /home/user/domains/domain.com/vendor/drush/drush/src/Application.php on line 313