Skip to content

Commit

Permalink
Issue #3126566 by greg.1.anderson, jungle, tedbow, hussainweb, Kriste…
Browse files Browse the repository at this point in the history
…n Pol, alexpott: Allow Drupal to work with Composer 2
  • Loading branch information
catch committed May 11, 2020
1 parent aeb6c0e commit 53363d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ public function testVerifyTemplateTestProviderIsAccurate() {
* @dataProvider provideTemplateCreateProject
*/
public function testTemplateCreateProject($project, $package_dir, $docroot_dir) {
$composerVersionLine = exec('composer --version');
if (strpos($composerVersionLine, 'Composer version 2') !== FALSE) {
$this->markTestSkipped('We cannot run the template create project test with Composer 2 until we have a stable version of composer/semver 2.x. The create project test installs drupal/core-recommended and the Drupal Composer plugins from Packagist, so these must also be compatible with Composer 2.x in order for this test to work.');
}

$this->copyCodebase();

// Get the Drupal core version branch. For instance, this should be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ protected function setUp() {
* Test upgrading the Composer Scaffold plugin.
*/
public function testScaffoldUpgrade() {
$composerVersionLine = exec('composer --version');
if (strpos($composerVersionLine, 'Composer version 2') !== FALSE) {
$this->markTestSkipped('We cannot run the scaffold upgrade test with Composer 2 until we have a stable version of drupal/core-composer-scaffold to start from that we can install with Composer 2.x.');
}
$this->fixturesDir = $this->fixtures->tmpDir($this->getName());
$replacements = ['SYMLINK' => 'false', 'PROJECT_ROOT' => $this->fixtures->projectRoot()];
$this->fixtures->cloneFixtureProjects($this->fixturesDir, $replacements);
Expand Down

0 comments on commit 53363d6

Please sign in to comment.