我的composer.json文件
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"illuminate/html": "^5.0",
"laravelcollective/html": "~5.0",
"slim/slim": "2.*",
"slim/views": "0.1.*",
"illuminate/database": "5.0.*",
"illuminate/events": "5.0.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
}
}
作曲家更新后出错:
php artisan clear-compiled 使用包信息加载composer存储库 更新依赖项(包括require-dev) 您的要求无法解析为可安装的软件包。
Problem 1
- Conclusion: don't install laravel/framework v5.1.20
- Conclusion: don't install laravel/framework v5.1.19
- Conclusion: don't install laravel/framework v5.1.18
- Conclusion: don't install laravel/framework v5.1.17
- Conclusion: don't install laravel/framework v5.1.16
- Conclusion: don't install laravel/framework v5.1.15
- Conclusion: don't install laravel/framework v5.1.14
- Conclusion: don't install laravel/framework v5.1.13
- Conclusion: don't install laravel/framework v5.1.12
- Conclusion: don't install laravel/framework v5.1.11
- Conclusion: remove laravel/framework v5.1.10
- Conclusion: don't install laravel/framework v5.1.10
- Conclusion: don't install laravel/framework v5.1.9
- Conclusion: don't install laravel/framework v5.1.8
- Conclusion: don't install laravel/framework v5.1.7
- Conclusion: don't install laravel/framework v5.1.6
- Conclusion: don't install laravel/framework v5.1.5
- Conclusion: don't install laravel/framework v5.1.4
- Conclusion: don't install laravel/framework v5.1.3
- Conclusion: don't install laravel/framework v5.1.2
- Conclusion: don't install laravel/framework v5.1.1
- illuminate/events v5.0.0 requires illuminate/container 5.0.* -> satisfiabl
e by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v
5.0.4].
- illuminate/events v5.0.22 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
- illuminate/events v5.0.25 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
- illuminate/events v5.0.26 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
- illuminate/events v5.0.28 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
- illuminate/events v5.0.33 requires illuminate/container 5.0.* -> satisfiab
le by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33,
v5.0.4].
- illuminate/events v5.0.4 requires illuminate/container 5.0.* -> satisfiabl
e by illuminate/container[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v
5.0.4].
- don't install illuminate/container v5.0.0|don't install laravel/framework
v5.1.0
- don't install illuminate/container v5.0.22|don't install laravel/framework
v5.1.0
- don't install illuminate/container v5.0.25|don't install laravel/framework
v5.1.0
- don't install illuminate/container v5.0.26|don't install laravel/framework
v5.1.0
- don't install illuminate/container v5.0.28|don't install laravel/framework
v5.1.0
- don't install illuminate/container v5.0.33|don't install laravel/framework
v5.1.0
- don't install illuminate/container v5.0.4|don't install laravel/framework
v5.1.0
- Installation request for laravel/framework 5.1.* -> satisfiable by laravel
/framework[v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15,
v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.20, v5.1.3, v5.1.4, v5.1.5, v5
.1.6, v5.1.7, v5.1.8, v5.1.9].
- Installation request for illuminate/events 5.0.* -> satisfiable by illumin
ate/events[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4].
答案 0 :(得分:2)
您的composer.json
文件引用了以下依赖项:
"illuminate/database": "5.0.*"
"illuminate/events": "5.0.*"
但是,您需要的Laravel Framework版本是5.1。*。
只需更改照明版本依赖项,如下所示:
"illuminate/database": "5.1.*"
"illuminate/events": "5.1.*"
这些实际上是Laravel核心框架的一部分,因此您不需要将它们显式声明为依赖项。
我已对此进行了测试,但确实有效。
另一个问题是您已经定义了一个引用数据库"数据库"它实际上并没有解决任何问题。但这是一个单独的问题。