使用 composer for Drupal 8 模块安装 RC1 版本

Install RC1 version with composer for Drupal 8 module

我需要为 Drupal 8 模块安装特定的 RC1 版本with composer

示例:https://www.drupal.org/project/field_group (8.x-3.0-rc1)

我尝试使用约束:'8.x-3.0-rc1'。

composer require drupal/field_group:8.x-3.0-rc1

错误信息:

[UnexpectedValueException]
Could not parse version constraint 8.x-composer: Invalid version string "8.x-composer"

您可以指定要下载的模块/主题的版本如下:

作曲家要求 drupal/<modulename>:<version>

例如:

composer require 'drupal/token:^1.5'
composer require 'drupal/simple_fb_connect:~3.0'
composer require 'drupal/ctools:3.0.0-alpha26'
composer require 'drupal/field_group:3.0-rc1'
composer require 'drupal/token:1.x-dev'

为避免在不同 terminals/shells 上出现问题,请将版本用引号引起来,如上例所示。在这些示例中,版本映射如下:

  • ^1.5:映射到模块的最新稳定 8.x-1.x 版本。
  • ~3.0:映射到模块的最新稳定 8.x-3.x 版本。
  • 3.0.0-alpha26:映射到版本 8.x-3.0-alpha26
  • 3.0-rc1:映射到版本 8.x-3.0-rc1
  • 1.x-dev:映射到 8.x-1.x-dev

有关 ~(波浪号)和 ^(插入符号)的版本限制的更多信息,请参阅 Next Significant Release Operators