Issue #3319794 by effulgentsia, Anchal_gupta, longwave, xjm: Update to Symfony 6.2 RC or update drupal/recommended-project creation and testMinimumStabilityStrictness() to allow minimum-stability to be less stable than core's stability
parent
8b1819bf3b
commit
690d040fec
|
@ -85,6 +85,13 @@ class Composer {
|
|||
protected static function setTemplateProjectStability(string $root, string $version): void {
|
||||
$stability = VersionParser::parseStability($version);
|
||||
|
||||
// Drupal 10.0.0-RC1 is being released before Symfony 6.2.0-RC1, so
|
||||
// temporarily set the stability to beta instead of RC.
|
||||
// @todo Remove this after Symfony 6.2.0-RC1 is released.
|
||||
if (str_starts_with($version, '10.0.0-') && ($stability === 'RC')) {
|
||||
$stability = 'beta';
|
||||
}
|
||||
|
||||
$templateProjectPaths = static::composerSubprojectPaths($root, 'Template');
|
||||
foreach ($templateProjectPaths as $path) {
|
||||
$dir = dirname($path);
|
||||
|
|
|
@ -150,6 +150,13 @@ class ComponentGenerator {
|
|||
|
||||
$stability = VersionParser::parseStability(\Drupal::VERSION);
|
||||
|
||||
// Drupal 10.0.0-RC1 is being released before Symfony 6.2.0-RC1, so
|
||||
// temporarily set the stability to beta instead of RC.
|
||||
// @todo Remove this after Symfony 6.2.0-RC1 is released.
|
||||
if (str_starts_with(\Drupal::VERSION, '10.0.0-') && ($stability === 'RC')) {
|
||||
$stability = 'beta';
|
||||
}
|
||||
|
||||
// List of packages which we didn't find in either core requirement.
|
||||
$not_in_core = [];
|
||||
|
||||
|
|
|
@ -86,10 +86,19 @@ class ComposerProjectTemplatesTest extends ComposerBuildTestBase {
|
|||
* Make sure that static::MINIMUM_STABILITY is sufficiently strict.
|
||||
*/
|
||||
public function testMinimumStabilityStrictness() {
|
||||
$minimum_minimum_stability = $this->getCoreStability();
|
||||
|
||||
// Drupal 10.0.0-RC1 is being released before Symfony 6.2.0-RC1, so
|
||||
// temporarily set minimum_minimum_stability to beta instead of RC.
|
||||
// @todo Remove this after Symfony 6.2.0-RC1 is released.
|
||||
if (str_starts_with(\Drupal::VERSION, '10.0.0-') && ($minimum_minimum_stability === 'RC')) {
|
||||
$minimum_minimum_stability = 'beta';
|
||||
}
|
||||
|
||||
// Ensure that static::MINIMUM_STABILITY is not less stable than the
|
||||
// current core stability. For example, if we've already released a beta on
|
||||
// the branch, ensure that we no longer allow alpha dependencies.
|
||||
$this->assertGreaterThanOrEqual(array_search($this->getCoreStability(), static::STABILITY_ORDER), array_search(static::MINIMUM_STABILITY, static::STABILITY_ORDER));
|
||||
$this->assertGreaterThanOrEqual(array_search($minimum_minimum_stability, static::STABILITY_ORDER), array_search(static::MINIMUM_STABILITY, static::STABILITY_ORDER));
|
||||
|
||||
// Ensure that static::MINIMUM_STABILITY is the same as the least stable
|
||||
// dependency.
|
||||
|
|
Loading…
Reference in New Issue