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

查看:415
本文介绍了php - 来人给看看这个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].

解决方案

使用PHP7执行composer.phar

奇怪, laravel5.4 用php5.6是没问题的, 里面有哪个是额外的扩展包?

用PHP7, 或者把其它几个扩展包降版本.

这篇关于php - 来人给看看这个composer.json有什么问题啊?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆