grota / drush-psysh

Integration of psysh into Drush so that you can have a Drupal REPL
17 stars 4 forks source link

Cannot instantiate interface PhpParser\Parse #8

Open eyudkin opened 7 years ago

eyudkin commented 7 years ago

» drush psysh PHP Fatal error: Cannot instantiate interface PhpParser\Parser in /home/myuser/.drush/drush_psysh/vendor/psy/psysh/src/Psy/CodeCleaner.php on line 56 PHP Stack trace: PHP 1. {main}() /home/myuser/.composer/vendor/drush/drush/drush.php:0 PHP 2. drush_main() /home/myuser/.composer/vendor/drush/drush/drush.php:12 PHP 3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /home/myuser/.composer/vendor/drush/drush/includes/preflight.inc:66 PHP 4. drush_dispatch($command = array ('callback' => 'drush_command', 'description' => 'Drupal REPL via psysh', 'aliases' => array (0 => 'shell', 1 => 'repl', 2 => 'psysh'), 'examples' => array ('drush shell' => 'Invokes the Drupal REPL'), 'command' => 'drush-psysh', 'command-hook' => 'drush-psysh', 'invoke hooks' => TRUE, 'callback arguments' => array (), 'commandfile' => 'drush_psysh', 'path' => '/home/myuser/.drush/drush_psysh', 'engines' => array (), 'primary function' => 'drush_psysh_callback', 'sections' => array ('examples' => 'Examples', 'arguments' => 'Arguments', 'options' => 'Options'), 'arguments' => array (), 'required-arguments' => FALSE, 'options' => array (), 'sub-options' => array (), 'allow-additional-options' => FALSE, 'global-options' => array (), 'core' => array (), 'scope' => 'site', 'drush dependencies' => array (), 'handle-remote-commands' => FALSE, 'remote-tty' => FALSE, 'strict-option-handling' => FALSE, 'tilde-expansion' => TRUE, 'bootstrap_errors' => array (), 'topics' => array (), 'hidden' => FALSE, 'category' => 'drush_psysh', 'add-options-to-arguments' => FALSE, 'consolidation-output-formatters' => FALSE, 'annotated-command-callback' => '', 'annotations' => array (), 'drupal dependencies' => array (), 'bootstrap' => 6, 'is_alias' => TRUE, 'argument-description' => array ()), $arguments = uninitialized) /home/myuser/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:67 PHP 5. call_user_func_array:{/home/myuser/.composer/vendor/drush/drush/includes/command.inc:192}('drush_command', array ()) /home/myuser/.composer/vendor/drush/drush/includes/command.inc:192 PHP 6. drush_command() /home/myuser/.composer/vendor/drush/drush/includes/command.inc:192 PHP 7. _drush_invoke_hooks($command = array ('callback' => 'drush_command', 'description' => 'Drupal REPL via psysh', 'aliases' => array (0 => 'shell', 1 => 'repl', 2 => 'psysh'), 'examples' => array ('drush shell' => 'Invokes the Drupal REPL'), 'command' => 'drush-psysh', 'command-hook' => 'drush-psysh', 'invoke hooks' => TRUE, 'callback arguments' => array (), 'commandfile' => 'drush_psysh', 'path' => '/home/myuser/.drush/drush_psysh', 'engines' => array (), 'primary function' => 'drush_psysh_callback', 'sections' => array ('examples' => 'Examples', 'arguments' => 'Arguments', 'options' => 'Options'), 'arguments' => array (), 'required-arguments' => FALSE, 'options' => array (), 'sub-options' => array (), 'allow-additional-options' => FALSE, 'global-options' => array (), 'core' => array (), 'scope' => 'site', 'drush dependencies' => array (), 'handle-remote-commands' => FALSE, 'remote-tty' => FALSE, 'strict-option-handling' => FALSE, 'tilde-expansion' => TRUE, 'bootstrap_errors' => array (), 'topics' => array (), 'hidden' => FALSE, 'category' => 'drush_psysh', 'add-options-to-arguments' => FALSE, 'consolidation-output-formatters' => FALSE, 'annotated-command-callback' => '', 'annotations' => array (), 'drupal dependencies' => array (), 'bootstrap' => 6, 'is_alias' => TRUE, 'argument-description' => array ()), $args = array ()) /home/myuser/.composer/vendor/drush/drush/includes/command.inc:224 PHP 8. call_user_func_array:{/home/myuser/.composer/vendor/drush/drush/includes/command.inc:373}('drush_psysh_callback', array ()) /home/myuser/.composer/vendor/drush/drush/includes/command.inc:373 PHP 9. drush_psysh_callback() /home/myuser/.composer/vendor/drush/drush/includes/command.inc:373 PHP 10. Psy\Shell->__construct($config = uninitialized) /home/myuser/.drush/drush_psysh/drush_psysh.drush.inc:62 PHP 11. Psy\Configuration->getCodeCleaner() /home/myuser/.drush/drush_psysh/vendor/psy/psysh/src/Psy/Shell.php:74 PHP 12. Psy\CodeCleaner->__construct($parser = uninitialized, $printer = uninitialized, $traverser = uninitialized) /home/myuser/.drush/drush_psysh/vendor/psy/psysh/src/Psy/Configuration.php:706 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Cannot instantiate interface PhpParser\Parser in /home/myuser/.drush/drush_psysh/vendor/psy/psysh/src/Psy/CodeCleaner.php, line 56

eyudkin commented 7 years ago

Using last drush with last Drupal7

grota commented 7 years ago

what version of drush? drush --version. If it's drush 8.x.y then psysh is in drush core and you need to run drush php