无法在 5.4 上安装 Laravel/Passport
Can't Install Laravel/Passport on 5.4
我关注 docs 所以我 运行 这个。
composer require laravel/passport
但这就是我得到的...
Using version ^6.0 for laravel/passport
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/passport v6.0.7 requires illuminate/database ~5.6 -> satisfiable by illuminate/database[5.6.x-dev, 5.7.x-dev, 5.8.x-dev, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.2, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9] but these conflict with your requirements or minimum-stability.
查看composer.json文件好像我用的是5.4版本
"illuminate/database": "5.4.*",
这是有道理的,因为我正在使用该版本的框架。我该怎么办?更新很冒险吧?
更重要的是,为什么它不能开箱即用?
对于 laravel 5.4 你应该使用:
composer require laravel/passport=~4.0
如果你不指定版本,它会安装最新版本,实际是 laravel 5.6+
我关注 docs 所以我 运行 这个。
composer require laravel/passport
但这就是我得到的...
Using version ^6.0 for laravel/passport
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/passport v6.0.7 requires illuminate/database ~5.6 -> satisfiable by illuminate/database[5.6.x-dev, 5.7.x-dev, 5.8.x-dev, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.2, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9] but these conflict with your requirements or minimum-stability.
查看composer.json文件好像我用的是5.4版本
"illuminate/database": "5.4.*",
这是有道理的,因为我正在使用该版本的框架。我该怎么办?更新很冒险吧?
更重要的是,为什么它不能开箱即用?
对于 laravel 5.4 你应该使用:
composer require laravel/passport=~4.0
如果你不指定版本,它会安装最新版本,实际是 laravel 5.6+