Open sorry510 opened 4 years ago
我也遇到了,问题解决
composer
不支持 composer.json
中的 extra
.think-path
配置thinkphp 5.1
存在这个问题,5.2, 6.0 不存在这个问cd /path/to/thinkphp5.1 #或其他 thinkphp 版本目录
# window
mklink /j vendor\topthink\framework thinkphp
# linux
ln -s thinkphp vendor/topthink/framework
# 运行不再报错
composer dumpautoload
PS:如想要彻底解决需要些脚本自动创建对应软连接
我也遇到了,问题解决
原因:
composer
不支持composer.json
中的extra
.think-path
配置- 只有
thinkphp 5.1
存在这个问题,5.2, 6.0 不存在这个问解决:
cd /path/to/thinkphp5.1 #或其他 thinkphp 版本目录 # window mklink /j vendor\topthink\framework thinkphp # linux ln -s thinkphp vendor/topthink/framework # 运行不再报错 composer dumpautoload
PS:如想要彻底解决需要些脚本自动创建对应软连接
我用5.1试了还是不行
我使用的
tp
版本为5.1
,think-migration
版本为2.0.3
,这个库本身使用没有问题,但是会导致其它库的脚本无法执行,我使用这个库(captainhook/captainhook
)时,此库需要使用自动加载加载文件,执行cli的脚本,但是当require vendor/autoload.php
时 库的源码如下就会报如下错误,不光是这个库,我试了凡是用的自动加载的都会报错,这个应该是
think-migration
库的问题,我单独试了这个库没有问题,在laravel
试了也没有问题config.php的文件源码如下,为什么使用自动加载会无法加载到
think\Console
这个类呢,希望能修复这个bug