猿问

来人给看看这个composer.json有什么问题啊?

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "barryvdh/laravel-ide-helper": "^2.4",
        "laravel/framework": "5.4.*",
        "laravel/tinker": "~1.0",
        "mews/captcha": "^2.1",
        "overtrue/laravel-filesystem-qiniu": "^0.0.3",
        "predis/predis": "^1.1",
        "sven/artisan-view": "^1.3",
        "zizaco/entrust": "5.2.x-dev"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.7"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postInstall",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

出这些问题呢

Problem 1

- Installation request for doctrine/inflector v1.2.0 -> satisfiable by doctrine/inflector[v1.2.0].
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.27) does not satisfy that requirement.

Problem 2

- Installation request for phpdocumentor/reflection-docblock 3.2.3 -> satisfiable by phpdocumentor/reflection-docblock[3.2.3].
- phpdocumentor/reflection-docblock 3.2.3 requires php ^7.0 -> your PHP version (5.6.27) does not satisfy that requirement.

Problem 3

- Installation request for phpunit/php-token-stream 2.0.1 -> satisfiable by phpunit/php-token-stream[2.0.1].
- phpunit/php-token-stream 2.0.1 requires php ^7.0 -> your PHP version (5.6.27) does not satisfy that requirement.

Problem 4

- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.27) does not satisfy that requirement.
- laravel/framework v5.4.36 requires doctrine/inflector ~1.1 -> satisfiable by doctrine/inflector[v1.2.0].
- Installation request for laravel/framework v5.4.36 -> satisfiable by laravel/framework[v5.4.36].
米琪卡哇伊
浏览 1245回答 3
3回答

慕田峪7331174

使用PHP7执行composer.phar 奇怪, laravel5.4 用php5.6是没问题的, 里面有哪个是额外的扩展包? 用PHP7, 或者把其它几个扩展包降版本.

青春有我

不是写这了么,版本问题
随时随地看视频慕课网APP
我要回答