Composer安装/更新停止工作

时间:2015-12-03 15:37:34

标签: php laravel composer-php

突然间我的作曲家停止了工作。

每当我运行composer update时,它都没有进展:

  

使用包信息装载作曲家​​存储库
      更新依赖项(包括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"
    }
}

1 个答案:

答案 0 :(得分:1)

我做了一些测试,看起来这两个包组合会导致问题:

"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作曲家后,卡在

  

更新依赖项(包括require-dev)

如果您删除其中一个,composer update运行正常。我对这两个软件包一无所知,但即使在-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"
    }
}