2个月前,我在Laravel 5中创建了一个简单的应用程序。
今天我尝试做作曲家更新但失败了。
最后的信息说:
symfony/var-dumper suggests installing ext-symfony_debug ()
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
[Composer\DependencyResolver\SolverProblemsException]
Problem 1
- Installation request for laravel/framework ~5.0 -> satisfiable by laravel/frame
work[5.0.x-dev].
- laravel/framework 5.0.x-dev requires symfony/console 2.6.* -> no matching packa
ge found.
Problem 2
- laravel/framework 5.0.x-dev requires symfony/console 2.6.* -> no matching packa
ge found.
- illuminate/html 5.0.x-dev requires illuminate/http ~5.0 -> satisfiable by larav
el/framework[5.0.x-dev].
- Installation request for illuminate/html 5.0.*@dev -> satisfiable by illuminate
/html[5.0.x-dev].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-
stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for mo
re details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common prob
lems.
我从Github(laravel)上找到的最新i替换了我的composer.json
文件,但同样的消息出现了。
我也多次运行composer clearcache
。
通过阅读现有的composer install
文件,运行composer.lock
可使应用恢复生机。
composer.json文件:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "~5.0"
},
"require-dev": {
"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"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"
}
删除vandor目录并运行composer update后,我得到:
Writing lock file
Generating autoload files
Catchable fatal error: Argument 1 passed to Illuminate\Foundation\Application::detectEnvir
onment() must be an instance of Closure, array given, called in C:\UniServerZ\www\sicktrac
k\bootstrap\environment.php on line 18 and defined in C:\UniServerZ\www\sicktrack\vendor\l
aravel\framework\src\Illuminate\Foundation\Application.php on line 299
Script php artisan clear-compiled handling the post-update-cmd event returned with an erro
r