我只是使用"composer require drush/ drush“安装drush。它正确运行,并在完成导航到供应商/drush/drush/目录,其中drush.php文件位于
然后运行以下命令: php drush.php状态,并得到以下错误:
PHP Fatal error: Call to undefined method Consolidation\AnnotatedCommand\Hooks\HookManager::getHookOptions() in
[...]/work/www/EnviePractice/vendor/drush/drush/includes/annotationcommand_adapter.inc on line 475
PHP Stack trace:
PHP 1. {main}() [...]/work/www/EnviePractice/vendor/drush/drush/drush.php:0
PHP 2. drush_main() [...]/work/www/EnviePractice/vendor/drush/drush/drush.php:12
PHP 3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() [...]/work/www/EnviePractice/vendor/drush/drush/includes/preflight.inc:66
PHP 4. drush_dispatch() [...]/work/www/EnviePractice/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:67
PHP 5. annotationcommand_adapter_add_hook_options() [...]/work/www/EnviePractice/vendor/drush/drush/includes/command.inc:170
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined method Consolidation\AnnotatedCommand\Hooks\HookManager::getHookOptions() in
[...]/work/www/EnviePractice/vendor/drush/drush/includes/annotationcommand_adapter.inc, line 475有人能带我去看看是什么原因造成的吗?
其他详情:
发布于 2017-04-19 12:33:44
我认为您的安装或类注册表可能被破坏了。试着做以下事情:
drush rebuild是否有效(如果不起作用,请转到下一点)。composer install。drush rebuild在第一步没有工作,那么现在再试一次运行它。https://drupal.stackexchange.com/questions/234286
复制相似问题