我正在测试 Laravel Framework 新的 5.1 版本。
我想安装著名的barryvdh/laravel-ide-helper
软件包。
A 知道问题是:barryvdh/laravel-ide-helper
requireilluminate/filesystem: 5.0.x
和laravel/framework
require illuminate/filesystem: 5.1.x
。
如何配置我的composer.json
文件?
注意:我有"minimum-stability": "dev"
和"prefer-stable": true
在我的 composer.json 文件中。
在安装时,我收到此错误:
Problem 1
- Conclusion: remove laravel/framework 5.1.x-dev
- barryvdh/laravel-ide-helper 2.0.x-dev requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
- barryvdh/laravel-ide-helper v2.0.0 requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
- barryvdh/laravel-ide-helper v2.0.1 requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
- barryvdh/laravel-ide-helper v2.0.2 requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
- barryvdh/laravel-ide-helper v2.0.3 requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
- don't install illuminate/filesystem 5.0.x-dev|don't install laravel/framework 5.1.x-dev
- don't install illuminate/filesystem v5.0.0|don't install laravel/framework 5.1.x-dev
- don't install illuminate/filesystem v5.0.22|don't install laravel/framework 5.1.x-dev
- don't install illuminate/filesystem v5.0.25|don't install laravel/framework 5.1.x-dev
- don't install illuminate/filesystem v5.0.26|don't install laravel/framework 5.1.x-dev
- don't install illuminate/filesystem v5.0.28|don't install laravel/framework 5.1.x-dev
- don't install illuminate/filesystem v5.0.4|don't install laravel/framework 5.1.x-dev
- Installation request for laravel/framework 5.1.* -> satisfiable by laravel/framework[5.1.x-dev].
- Installation request for barryvdh/laravel-ide-helper ^2.0@dev -> satisfiable by barryvdh/laravel-ide-helper[2.0.x-dev, v2.0.0, v2.0.1, v2.0.2, v2.0.3].
我已经尝试了以下所有命令,结果相同...
$ composer require barryvdh/laravel-ide-helper,
$ composer require barryvdh/laravel-ide-helper:@dev --dev
$ composer require barryvdh/laravel-ide-helper --dev --update-with-dependencies
我还尝试在composer.json
文件中创建一个别名:
"require": {
"laravel/framework": "5.1.*",
"illuminate/filesystem": "5.1.x-dev as 5.0.28"
},
然后出现这个错误:
Problem 1
- Installation request for barryvdh/laravel-ide-helper dev-master -> satisfiable by barryvdh/laravel-ide-helper[dev-master].
- Conclusion: remove laravel/framework 5.1.x-dev
- Conclusion: don't install laravel/framework 5.1.x-dev
- barryvdh/laravel-ide-helper dev-master requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, 5.0.28].
- don't install illuminate/filesystem 5.0.x-dev|don't install laravel/framework 5.1.x-dev
- don't install illuminate/filesystem 5.0.28|don't install laravel/framework 5.1.x-dev
- Installation request for laravel/framework 5.1.* -> satisfiable by laravel/framework[5.1.x-dev].
这是我的composer.json
文件:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "5.1.*",
"illuminate/filesystem": "5.1.x-dev as 5.0.28"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"Portal\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php -r \"copy('.env.example', '.env');\"",
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev",
"prefer-stable": true
}