Commit 8a97c0d6 authored by catch's avatar catch
Browse files

Issue #3319794 by effulgentsia, Anchal_gupta, longwave, xjm: Update to Symfony...

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

(cherry picked from commit b31f40a6)
parent 10544d8d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -85,6 +85,13 @@ public static function setDrupalVersion(string $root, string $version): void {
  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);
+7 −0
Original line number Diff line number Diff line
@@ -150,6 +150,13 @@ protected function getPackage(IOInterface $io, string $original_json): array {

    $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 = [];

+10 −1
Original line number Diff line number Diff line
@@ -86,10 +86,19 @@ public function provideTemplateCreateProject() {
   * 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.