1

I'm using Drupal 8.1.2 and Drush 8.1.2 (OS X 10.11.5, PHP 5.6.19)

In all of my drush-commands, there occurs an error, that there is a missing implementations of the symfony EventDispatcherInterface::getListenerPriority in the drupal core.

The error occurs on clean drupal installations and also on updated. I've tried to solve the problem by installing a different drupal-version (older and latest ->8.1.2) and older drush-versions (via composer, 8.1.0), but without any results.

This is the my stacktrace:

localhost:web3 myusername$ drush up
PHP Fatal error:  Class Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Symfony\Component\EventDispatcher\EventDispatcherInterface::getListenerPriority) in /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php on line 233
PHP Stack trace:
PHP   1. {main}() /Users/myusername/.composer/vendor/drush/drush/drush.php:0
PHP   2. drush_main() /Users/myusername/.composer/vendor/drush/drush/drush.php:12
PHP   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /Users/myusername/.composer/vendor/drush/drush/includes/preflight.inc:66
PHP   4. drush_bootstrap_to_phase() /Users/myusername/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:59
PHP   5. drush_bootstrap() /Users/myusername/.composer/vendor/drush/drush/includes/bootstrap.inc:473
PHP   6. Drush\Boot\DrupalBoot8->bootstrap_drupal_full() /Users/myusername/.composer/vendor/drush/drush/includes/bootstrap.inc:354
PHP   7. Drush\Boot\DrupalBoot->bootstrap_drupal_full() /Users/myusername/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot8.php:135
PHP   8. drush_cache_get() /Users/myusername/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php:537
PHP   9. dt() /Users/myusername/.composer/vendor/drush/drush/includes/cache.inc:75
PHP  10. Drupal::translation() /Users/myusername/.composer/vendor/drush/drush/includes/output.inc:163
PHP  11. Drupal\Component\DependencyInjection\Container->get() /Users/myusername/Projects/drupal/web3/core/lib/Drupal.php:592
PHP  12. Drupal\Component\DependencyInjection\Container->createService() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:177
PHP  13. Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:329
PHP  14. Drupal\Component\DependencyInjection\Container->get() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:494
PHP  15. Drupal\Component\DependencyInjection\Container->createService() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:177
PHP  16. Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:236
PHP  17. Drupal\Component\DependencyInjection\Container->get() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:494
PHP  18. Drupal\Component\DependencyInjection\Container->createService() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:177
PHP  19. Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:236
PHP  20. Drupal\Component\DependencyInjection\Container->get() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:494
PHP  21. Drupal\Component\DependencyInjection\Container->createService() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:177
PHP  22. spl_autoload_call() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:272
PHP  23. Symfony\Component\ClassLoader\ApcClassLoader->loadClass() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:0
PHP  24. require() /Users/myusername/Projects/drupal/web3/vendor/symfony/class-loader/ApcClassLoader.php:110


Call Stack:
    0.0001     225296   1. {main}() /Users/myusername/.composer/vendor/drush/drush/drush.php:0
    0.0012     391568   2. drush_main() /Users/myusername/.composer/vendor/drush/drush/drush.php:12
    0.2267    8520768   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /Users/myusername/.composer/vendor/drush/drush/includes/preflight.inc:66
    0.2292    8527928   4. drush_bootstrap_to_phase() /Users/myusername/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:59
    0.3374    8636336   5. drush_bootstrap() /Users/myusername/.composer/vendor/drush/drush/includes/bootstrap.inc:473
    0.3376    8638920   6. Drush\Boot\DrupalBoot8->bootstrap_drupal_full() /Users/myusername/.composer/vendor/drush/drush/includes/bootstrap.inc:354
    0.3921   16940128   7. Drush\Boot\DrupalBoot->bootstrap_drupal_full() /Users/myusername/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot8.php:135
    0.3955   17096672   8. drush_cache_get() /Users/myusername/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php:537
    0.3956   17097472   9. dt() /Users/myusername/.composer/vendor/drush/drush/includes/cache.inc:75
    0.3957   17098416  10. Drupal::translation() /Users/myusername/.composer/vendor/drush/drush/includes/output.inc:163
    0.3957   17098464  11. Drupal\Component\DependencyInjection\Container->get() /Users/myusername/Projects/drupal/web3/core/lib/Drupal.php:592
    0.3958   17106856  12. Drupal\Component\DependencyInjection\Container->createService() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:177
    0.3979   17338080  13. Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:329
    0.3979   17338520  14. Drupal\Component\DependencyInjection\Container->get() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:494
    0.3979   17345920  15. Drupal\Component\DependencyInjection\Container->createService() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:177
    0.3979   17345920  16. Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:236
    0.3993   17525976  17. Drupal\Component\DependencyInjection\Container->get() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:494
    0.3993   17533424  18. Drupal\Component\DependencyInjection\Container->createService() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:177
    0.3993   17533424  19. Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:236
    0.4005   17688296  20. Drupal\Component\DependencyInjection\Container->get() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:494
    0.4007   17817768  21. Drupal\Component\DependencyInjection\Container->createService() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:177
    0.4007   17818600  22. spl_autoload_call() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:272
    0.4008   17818880  23. Symfony\Component\ClassLoader\ApcClassLoader->loadClass() /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/DependencyInjection/Container.php:0
    0.4011   17866704  24. require('/Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php') /Users/myusername/Projects/drupal/web3/vendor/symfony/class-loader/ApcClassLoader.php:110

Drush command terminated abnormally due to an unrecoverable error.                                                                                                                                                                 [error]
Error: Class Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher contains 1 abstract method and must therefore be declared abstract or implement the remaining methods
(Symfony\Component\EventDispatcher\EventDispatcherInterface::getListenerPriority) in /Users/myusername/Projects/drupal/web3/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php, line 233

I'm pretty sure that this error is drush-related. What do I miss?

0

Try using a site-local Drush instead of a globally installed Drush.

See:

https://pantheon.io/blog/avoiding-dependency-hell-site-local-drush

  • Thanks Greg! I didn't knew this was possible. It works now with your solution :) – lduer Jun 29 '16 at 6:11
  • I must mention here, that basic drush commands are working now, but when I use $ drush up drupal, the following error occurs: Unable to load class \Drush\VersionControl\Backup – lduer Jun 29 '16 at 13:43
  • Run with --debug, and report the results in the Drush issue queue. github.com/drush-ops/drush/issues – greg_1_anderson Jun 29 '16 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.