您的要求無法解析為一組可安裝的軟體包

您的要求無法解析為一組可安裝的軟體包

所以我想得到calcinai/xero-php使用 Composer 安裝,但具體出現此錯誤。

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package calcinai/xero-php No version set (parsed as 1.0.0) is satisfiable by calcinai/xero-php[No version set (parsed as 1.0.0)] but these conflict with your requirements or minimum-stability.


Installation failed, reverting ./composer.json to its original content.

我嘗試透過添加"calcinai/xero-php": "1.5.*"到我的需求清單並輸入composer require calcinai/xero-php終端來安裝兩者。

目前的 json 檔如下:

{
    "name": "calcinai/xero-php",
    "type": "library",
    "description": "A client implementation of the Xero API, with a cleaner OAuth interface and ORM-like abstraction.",
    "homepage": "https://github.com/calcinai/xero-php",
    "license": "MIT",

    "require": {
        "php": ">=5.5.0",
        "ext-curl": "*",
        "ext-openssl": "*",
        "calcinai/xero-php": "1.5.*"
    },

    "require-dev": {
        "phpunit/phpunit": "~4.7",
        "fabpot/goutte": "~2.0",
        "twig/twig": "1.16.2"
    },

    "repositories": [
    ],

    "autoload": {
        "psr-4": {
            "XeroPHP\\": "src/XeroPHP/"
        }
    }

}

任何幫助,將不勝感激。

答案1

我透過在composer.json中添加"version": "1.5.0",after解決了我的問題 。"description"

答案2

需求:php:>=5.5.0、ext-curl、ext-openssl、calcinai/xero-php:^1.8

目前的 json 檔如下:

{
    "name": "calcinai/xero-php",
    "type": "library",
    "description": "A client implementation of the Xero API, with a cleaner OAuth interface and ORM-like abstraction.",
    "version": "1.8.6",
    "homepage": "https://github.com/calcinai/xero-php",
    "license": "MIT",

    "require": {
        "php": ">=5.5.0",
        "ext-curl": "*",
        "ext-openssl": "*",
        "calcinai/xero-php": "^1.8"
    },

    "require-dev": {
        "phpunit/phpunit": "~4.7",
        "fabpot/goutte": "~2.0",
        "twig/twig": "1.16.2"
    },

    "repositories": [
    ],

    "autoload": {
        "psr-4": {
            "XeroPHP\\": "src/XeroPHP/"
        }
    }
}

相關內容