我的作曲家突然停止了工作.
每当我运行composer update时,它都不会在此之后进行:
Loading composer repositories with package information
Updating dependencies (including require-dev)
我尝试了另一个Laravel项目,该项目的Composer正在运行
我清除了缓存,并运行了这个命令rm -rf~ / .composer / cache
似乎什么也没发生.我将composer.lock移动到另一个文件夹,从当前项目中删除并再次运行命令,但没有运气
这是我的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.*",
"nesbot/carbon": "~1.14",
"venturecraft/revisionable": "~1.8",
"doctrine/dbal": "v2.4.2",
"zizaco/entrust": "dev-laravel-5",
"aws/aws-sdk-php-laravel": "~3.0",
"guzzlehttp/guzzle": "~5.2",
"league/flysystem-aws-s3-v2": "~1.0",
"sofa/revisionable": "~1.0@dev",
"maatwebsite/excel": "~2.0.0",
"monolog/monolog": "^1.15",
"jenssegers/agent": "^2.2",
"php-mime-mail-parser/php-mime-mail-parser": "^2.1",
"messaged/php-mime-mail-parser": "^1.0",
"willdurand/email-reply-parser": "^2.4",
"barryvdh/laravel-debugbar": "~2.0.2"
},
"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/",
"Validations\\": "app/Validations"
},
"files": [
"app/Support/helpers.php"
]
},
"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"
}
}
最佳答案 我做了一些测试,看起来这两个包的组合会导致问题:
"aws/aws-sdk-php-laravel": "~3.0",
"league/flysystem-aws-s3-v2": "~1.0",
它们适合每个人安装,但不能安装在一起.我使用了新的Laravel 5.1安装进行测试(composer create-project laravel / laravel –prefer-dist).只将这两个包添加到composer.json后,Composer被困在了
Updating dependencies (including require-dev)
如果你删除其中一个,你的作曲家更新运行正常.我对这两个软件包一无所知,但即使在-verbose模式下,这个组合肯定会使Composer崩溃.
崩溃的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.*",
"aws/aws-sdk-php-laravel": "~3.0",
"league/flysystem-aws-s3-v2": "~1.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/",
"Validations\\": "app/Validations"
}
},
"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"
}
}