Verified Commit 3b93f206 authored by Jess's avatar Jess
Browse files

Issue #3215870 by catch, effulgentsia, Gábor Hojtsy, xjm, andypost, longwave,...

Issue #3215870 by catch, effulgentsia, Gábor Hojtsy, xjm, andypost, longwave, freelock, Mixologic, phenaproxima, ressa: Require Composer 2.3.5 for developing Drupal 10 core

(cherry picked from commit d0a3628e)
parent 6b2c3570
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -91,8 +91,8 @@ protected static function setTemplateProjectStability(string $root, string $vers
  public static function ensureComposerVersion(): void {
    $composerVersion = method_exists(ComposerApp::class, 'getVersion') ?
      ComposerApp::getVersion() : ComposerApp::VERSION;
    if (Comparator::lessThan($composerVersion, '2.0.0')) {
      throw new \RuntimeException("Drupal core development requires Composer 2.0.0, but Composer $composerVersion is installed. Please run 'composer self-update'.");
    if (Comparator::lessThan($composerVersion, '2.3.5')) {
      throw new \RuntimeException("Drupal core development requires Composer 2.3.5, but Composer $composerVersion is installed. Please run 'composer self-update'.");
    }
  }

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ public function testEnsureComposerVersion() {
      $this->assertNull(Composer::ensureComposerVersion());
    }
    catch (\RuntimeException $e) {
      $this->assertMatchesRegularExpression('/Drupal core development requires Composer 2.0.0, but Composer /', $e->getMessage());
      $this->assertMatchesRegularExpression('/Drupal core development requires Composer 2.3.5, but Composer /', $e->getMessage());
    }
  }