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

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

所以我想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",后解决了我的问题。"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/"
        }
    }
}

相关内容