But these conflict with your requirements or minimum-stability

不打扰是莪最后的温柔 提交于 2019-12-01 16:05:53

问题


Hi, I'm getting this problem when I try to install SparkPost PHP Library:

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

It appears when I try to execute this command:
composer require sparkpost/sparkpost


Full Console Output:

You are running Composer with SSL/TLS protection disabled.
Using version ^2.0 for sparkpost/sparkpost
./composer.json has been updated
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 sparkpost/sparkpost No version set (parsed as 1.0.0) is satisfiable by sparkpost/sparkpost[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.

Composer File:

{
  "name": "sparkpost/sparkpost",
  "description": "Client library for interfacing with the SparkPost API.",
  "license": "Apache 2.0",
  "authors": [
    {
      "name": "SparkPost"
    }
  ],
  "minimum-stability": "stable",
  "scripts": {
    "post-install-cmd": "post-install.sh",
    "post-update-cmd": "post-install.sh",
    "test": "./vendor/bin/phpunit",
    "fix-style": "php-cs-fixer fix ."
  },
  "require": {
    "php": "^5.6 || ^7.0",
    "php-http/httplug": "^1.0",
    "php-http/message": "^1.0",
    "php-http/client-implementation": "^1.0",
    "php-http/discovery": "^1.0",
    "php-http/guzzle6-adapter": "^1.1",
    "guzzlehttp/guzzle": "^6.2"
  },
  "require-dev": {
    "phpunit/phpunit": "^4.8 || ^5.4",
    "mockery/mockery": "^0.9.4",
    "friendsofphp/php-cs-fixer": "^1.11",
    "nyholm/nsa": "^1.0",
    "satooshi/php-coveralls": "dev-master",
    "phpunit/phpcov": "2.*"
  },
  "autoload": {
    "psr-4": {
      "SparkPost\\": "lib/SparkPost"
    }
  },
  "autoload-dev": {
    "psr-4": {
      "SparkPost\\Test\\": "test/unit"
    }
  }
}

Any solution?



PD: I've tried to set "minimum-stability": "stable" to "dev", but I have the same error


回答1:


You can define it in composer.json as:

"some-vendor/some-library": "@dev"

That should overrule the stability-setting.




回答2:


If your project doesn't have version, you should specify require the development version, e.g.:

composer require sparkpost/sparkpost --dev

or:

composer require sparkpost/sparkpost:dev-master

You can specify the version in your composer.json, then create a tag for that release (git tag).

See also: How do i use Composer to install a package without a version (only master)



来源:https://stackoverflow.com/questions/40453388/but-these-conflict-with-your-requirements-or-minimum-stability

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!