Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declaration of Drush\Command\DrushInputAdapter::hasParameterOption() must be compatible with Symfony\Component\Console\Input\InputInterface::hasParameterOption($values, $onlyParams = false) #2415

Closed
djdevin opened this issue Oct 26, 2016 · 12 comments

Comments

@djdevin
Copy link

djdevin commented Oct 26, 2016

From the 8.1.7 phar.

Drush command terminated abnormally due to an unrecoverable error.                                                                                   [error]
Error: Declaration of Drush\Command\DrushInputAdapter::hasParameterOption() must be compatible with
Symfony\Component\Console\Input\InputInterface::hasParameterOption($values, $onlyParams = false) in
phar:///usr/local/bin/drush/lib/Drush/Command/DrushInputAdapter.php, line 27
The external command could not be executed due to an application error.                                                                              [error]
PHP Fatal error:  Declaration of Drush\Command\DrushInputAdapter::hasParameterOption() must be compatible with Symfony\Component\Console\Input\InputInterface::hasParameterOption($values, $onlyParams = false) in phar:///usr/local/bin/drush/lib/Drush/Command/DrushInputAdapter.php on line 27
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/drush:0
PHP   2. require() /usr/local/bin/drush:10
PHP   3. drush_startup() phar:///usr/local/bin/drush/drush:114
PHP   4. drush_run_main() phar:///usr/local/bin/drush/includes/startup.inc:365
PHP   5. drush_main() phar:///usr/local/bin/drush/includes/startup.inc:458
PHP   6. Drush\Boot\BaseBoot->bootstrap_and_dispatch() phar:///usr/local/bin/drush/includes/preflight.inc:66
PHP   7. drush_dispatch() phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php:67
PHP   8. call_user_func_array:{phar:///usr/local/bin/drush/includes/command.inc:199}() phar:///usr/local/bin/drush/includes/command.inc:199
PHP   9. drush_command() phar:///usr/local/bin/drush/includes/command.inc:199
PHP  10. _drush_invoke_hooks() phar:///usr/local/bin/drush/includes/command.inc:231
PHP  11. spl_autoload_call() phar:///usr/local/bin/drush/includes/command.inc:353
PHP  12. Composer\Autoload\ClassLoader->loadClass() phar:///usr/local/bin/drush/includes/command.inc:353
PHP  13. Composer\Autoload\includeFile() phar:///usr/local/bin/drush/vendor/composer/ClassLoader.php:301
PHP  14. include() phar:///usr/local/bin/drush/vendor/composer/ClassLoader.php:414
Drush command terminated abnormally due to an unrecoverable error.                                       
@djdevin
Copy link
Author

djdevin commented Oct 26, 2016

Doesn't happen in 9.x-dev, so maybe a non-issue.

@djdevin djdevin closed this as completed Oct 26, 2016
@stmh
Copy link

stmh commented Oct 27, 2016

Why is this closed? Happens on 8.x after a fresh install via composer.

@weitzman
Copy link
Member

weitzman commented Oct 27, 2016 via email

@stmh
Copy link

stmh commented Oct 27, 2016

Going back to 8.1.4 fixed the problem

@itafroma
Copy link

itafroma commented Oct 31, 2016

This winds up being problematic for any use-case where you use Symfony console version 3, like if you're developing/using modules in Drupal 7 (which has no declared Symfony Console 2.8 requirement) that use it. Any reason the change in dependencies was added to a patch version insead of at least 8.2.0?

@stmh From my testing, Drush 8.1.5 is also free from this problem.

@DuaelFr
Copy link

DuaelFr commented Dec 1, 2016

I had the issue today with drush 8.2-dev.
I upgraded to Drush 9 to fix the problem.

@djdevin
Copy link
Author

djdevin commented Dec 1, 2016

I closed it because I thought my Drush was just too old to work with composer/console whatever.

Seems like #2474 is the issue.

@SUN123RAY
Copy link

I upgraded to Drush 9 beta, but not improving. Showing the same error.

@greg-1-anderson
Copy link
Member

@SUN123RAY Maybe Drush 9 is redispatching to an old version of Drush 8. If your target site is composer-managed, check your composer.lock and see what version of Drush is installed. Update to 8.1.15 or 9.

@SUN123RAY
Copy link

SUN123RAY commented Nov 8, 2017 via email

@SUN123RAY
Copy link

@SUN123RAY
Copy link

sorry @greg-1-anderson I think I have checked in wrong composer.lock. OK here is the correct one attached.
I have checked
grep "drush" composer.lock
"name": "drush/drush",
"url": "https://github.com/drush-ops/drush.git",
"url": "https://api.github.com/repos/drush-ops/drush/zipball/c9e6ac15b88d9329f560e90cc6c801b9b7859ad7",
"drush"
"homepage": "http://www.drush.org",
"drush/drush": 10
composer.lock.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants