gpt4 book ai didi

php - 使用 php artisantinker 时未找到 Psy/ShellOutput 类

转载 作者:行者123 更新时间:2023-12-03 02:32:35 25 4
gpt4 key购买 nike

我创建了一个新项目

composer create-project --prefer-dist laravel/laravel test-web

命令。当我尝试使用 php artisantinker 来测试文档中描述的一些内容时,我收到以下不间断出现的错误:

PHP Error: Class 'Psy/ShellOutput' not found in C:/Users/Development/Projects/laravel/test-web/vendor/psy/psysh/src/Shell.php on line 374

它一直充斥着命令行,直到我按下 CTRL+C

我在网络上没有找到与该错误相关的任何信息。我还检查了该类的文件是否存在,使用了composer update,尝试了laravel new test-web-2,但什么也没有。

在旧项目中运行 php artisantinker 不会给我任何错误,所以我认为这可能与新版本有关?有办法让它发挥作用吗?我在 Windows 10、PHP 7.3.3 上运行它

最佳答案

PsySH v0.9.10 有一个错误——缺少 use 语句,这要归功于拙劣的 git rebase——安装它需要大约二十分钟的时间上那个版本。 composer 更新 应该会为您提供 v0.9.11,该版本已被认证为无错误! (至少从那个错误中)

关于php - 使用 php artisantinker 时未找到 Psy/ShellOutput 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59079124/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com