Composer 中用于开发和生产的不同软件包版本

我正在研究多个作曲家包和一个应用程序,该应用程序需要我开发的所有包。

我想知道我如何拥有一个包含多个版本的包

  1. 用于生产的稳定版本

  2. 本地开发的开发/主版本

我尝试遵循配置但它不起作用

{

  "minimum-stability" : "dev",

  "require"           : {

    "varunsridharan/vsp-framework" : "^1.0",

    "wponion/wponion"              : "^1.0"

  },

  "require-dev"       : {

    "varunsridharan/vsp-framework" : "dev-master",

    "wponion/wponion"              : "dev-development"

  }

}

当我运行composer install或composer install --no-dev得到以下输出时


Loading composer repositories with package information

Updating dependencies



  [Composer\DependencyResolver\SolverProblemsException]

  Problem 1

      - The requested package varunsridharan/vsp-framework ^1.0 exists as varunsridharan/vsp-framework[dev-master] but these are rejected by your constraint.

    Problem 2

      - The requested package wponion/wponion ^1.0 exists as wponion/wponion[dev-development] but these are rejected by your constraint.



install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-author

itative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...


凤凰求蛊
浏览 253回答 2
2回答

月关宝盒

您可以尝试在开发环境中更改 composer.json 文件。见作曲家COMPOSER=composer-dev.json&nbsp;php&nbsp;composer&nbsp;install
打开App,查看更多内容
随时随地看视频慕课网APP