【发布时间】:2019-10-02 07:11:57
【问题描述】:
我正在尝试在我的项目上运行 php artisan tinker 并收到此错误:
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();
如您所见,问题出在 80 行。
我想我必须提到,我曾经在我的一个控制器中使用Throwable 和FatalThrowableError 来获得Exception,因为一般Exception 无法获得我得到的Exception!我以另一种方式处理了那个可抛出的错误,并且能够通过Exception 自己获得那个Exception!无论如何,我没有在我的代码中的任何地方使用Throwable 或FatalThrowableError,但我仍然收到上述错误。
我怎样才能让php artisan tinker 再次工作?我认为这个问题与composer有关。
【问题讨论】:
标签: php laravel symfony tinker