简体   繁体   English

如何在Laravel 5.3中安装Jaxon 2.0

[英]How to install Jaxon 2.0 in Laravel 5.3

Good day. 美好的一天。

I followed the tutorial instruccions to install. 我按照教程的说明进行安装。

Installation 安装

Add the following lines in the composer.json file, and run the composer update command. 在composer.json文件中添加以下行,然后运行composer update命令。

"require": {
    "jaxon-php/jaxon-laravel": "~2.0"
}

But i recieve the following error: 但我收到以下错误:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package jaxon-php/jaxon-laravel ~2.0 is satisfiable by jaxon-php/jaxon-laravel[v2.0-beta.1, v2.0-beta.2, v2.0-beta.3, v2.0-beta.4, v2.0-beta.5, v2.0-beta.6] but these conflict with your requirements or minimum-stability.

This is my composer.json file: 这是我的composer.json文件:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.3.*",
        "laravelcollective/html": "^5.3.0",
        "yajra/laravel-datatables-oracle": "^6.20",
        "elibyy/tcpdf-laravel": "5.3.*",
        "iatstuti/laravel-nullable-fields": "~1.0",
        "orangehill/iseed": "2.2",
        "jaxon-php/jaxon-laravel": "~2.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.0",
        "symfony/css-selector": "3.1.*",
        "symfony/dom-crawler": "3.1.*"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "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"
    }
}

Any ideas? 有任何想法吗? Thank you. 谢谢。

Googling arround i think i found my problem: 谷歌搜索周围我认为我发现了我的问题:

Since jaxon is in BETA version and composer default minimun stability requeriments are STABLE, composer failed to install the package. 由于jaxon是BETA版本,并且composer的默认最小稳定性要求稳定,因此composer无法安装该软件包。

I added this 2 lines to my composer.json: 我将这两行添加到我的composer.json中:

"minimum-stability": "beta",
"prefer-stable": true,

Source: http://webtips.krajee.com/setting-composer-minimum-stability-application/ https://getcomposer.org/doc/04-schema.md#minimum-stability 来源: http : //webtips.krajee.com/setting-composer-minimum-stability-application/ https://getcomposer.org/doc/04-schema.md#minimum-stability

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM