Drupal.org's composer endpoints are now out of beta and considered stable. An important change with this stable release is that the DrupalCI testing system now uses Composer to gather dependencies for testing Drupal projects.
Previously, the DrupalCI testbots would use the most recent non-dev release of a project. However, the DrupalCI testbots enable prefer-stable: true in their root composer.json file when testing. This means that if the project depends on a current major version without a stable release, a prior stable release will be used by the testbots.
For example, if a project has a 1.x branch with a stable release, but a 2.x branch with a beta release, the 2.x beta release would have been used when testing the project in the past. However, with the new composer based testbots, the stable release on the 1.x branch will be preferred.
Therefore, for any project that depends on a major version that does yet have a stable release, but had one in a previous major version, the maintainer must specify major version constraints on their project dependencies in order for them to be properly tested
-
For projects that do not have a composer.json file, the info.yml file must be updated to specify the version compatibility range - in the format:
test_depenencies[] = media:media (>=2.0, < 3.0) -
For projects that have a composer.json file, developers can restrict the required version of the module to a range that is known to be compatible by using a version constraint as part of the command:
$ composer require drupal/<modulename>: <version constraint>.- For example:
$ composer require "drupal/ctools:^3.0" - This require statement with its version constraint ensures that you will get the most stable release within the 3.x branch of the project.
- For more information about version constraints, you can consult the official composer documentation: https://getcomposer.org/doc/articles/versions.md
- For example: