Laravel Tinker错误:Symfony \ Component \ Debug \ Exception \ FatalThrowableError:调用未定义的方法Psy \ Configuration :: getLoop()

时间:2019-05-15 08:00:37

标签: php laravel symfony tinker

我正在尝试在项目上运行pip <commands>并收到此错误:

php artisan tinker

如您所见,问题出在 80 行上。 我想我必须提到,我曾经在自己的一个控制器中使用Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined method Psy\Configuration::getLoop() at /var/www/[my_project]/vendor/psy/psysh/src/Psy/Shell.php:80 76| public function __construct(Configuration $config = null) 77| { 78| $this->config = $config ?: new Configuration(); 79| $this->cleaner = $this->config->getCodeCleaner(); > 80| $this->loop = $this->config->getLoop(); 81| $this->context = new Context(); 82| $this->includes = array(); 83| $this->readline = $this->config->getReadline(); 84| $this->inputBuffer = array(); Throwable来获取FatalThrowableError,因为一般的Exception无法获取Exception我得到了!我以另一种方式处理了该可抛出错误,并且能够通过Exception本身来获取该Exception!无论如何,我再也没有在代码中的任何地方使用ExceptionThrowable了,但是仍然出现上述错误。

如何重新FatalThrowableError工作?我认为该问题与php artisan tinker有某种联系。

1 个答案:

答案 0 :(得分:0)

我刚刚手动删除了vendor文件夹,并尝试运行composer install。这样,php artisan tinker命令再次正常工作。 这可能不是正确的解决方案,但是无论如何,它仍然可以工作。也许只是删除vendor/psy文件夹并运行composer install即可。