Composer update~请求的包存在,但这些包被约束拒绝

时间:2018-01-19 15:43:26

标签: php composer-php

这是我的 composer.json 文件。 出于某些私人原因,我删除了一些我认为与此错误无关的行。

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "minimum-stability":"dev",
    "require": {
        "laravel/framework": "5.0.*",
        "doctrine/dbal": "~2.3",
        "illuminate/html": "5.*",
        "guzzlehttp/guzzle": "5.*",
        "bugsnag/bugsnag-laravel": "1.*",
        "predis/predis": "~1.0",
        "phpclasses/financial_class": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "~6.0",
        "phpspec/phpspec": "~2.1",
        "mockery/mockery": "^0.9.4"
    },
    "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 -r \"copy('.env.example', '.env');\"",
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "repositories": [
        {
            "type": "git",
            "url": "***"
        },
        {
            "type": "vcs",
            "url": "***"
        },
        {
            "type": "vcs",
            "url": "***"
        },
        {
            "type": "vcs",
            "url": "***"
        },
        {
            "type": "vcs",
            "url": "***"
        },
        {
            "packagist": false
        }
    ]
}

phpunit / phpunit是“~4.0”,但在我将其修改为“~6.0”后,运行composer update会出现此错误:

  

您的要求无法解析为可安装的软件包。

     

问题1

The requested package phpunit/phpunit ~6.0 exists as phpunit/phpunit[4.8.x-dev] but these are rejected by your constraint.

0 个答案:

没有答案