Problem/Motivation

In #3126566: Allow Drupal to work with Composer 2, the scaffold upgrade test was disabled for Composer 2. This test will fail with Composer 2 until there is a stable (tagged) release of drupal/recommended-project et. al. that can be installed with Composer 2, as the upgrade test begins by installing a fresh stable version of the Drupal project template, and then tries to upgrade it to the SUT (the Drupal system-under-test, the current Drupal version with the patch being tested applied).

Proposed resolution

Re-enable this test once there is a stable release available to start from. The test should continue to install Drupal ^8.8.0 when run with Composer 1, but should start with the later release when run with Composer 2.

The test in question is in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php:

   public function testScaffoldUpgrade() {
+    $composerVersionLine = exec('composer --version');
+    if (strstr($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.');
+    }

Remaining tasks

  • Remove the 'markTestSkipped' in testScaffoldUpgrade.
  • Select the starting version of Drupal based on the version of Composer being used to run the test.

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

n/a

CommentFileSizeAuthor
#3 3128641-3.patch1.11 KBandypost
#2 3128641-2.patch1.96 KBandypost

Comments

greg.1.anderson created an issue. See original summary.

andypost’s picture

Version: 9.0.x-dev » 9.1.x-dev
Status: Active » Needs review
StatusFileSize
new1.96 KB

Let's see how it goes now

andypost’s picture

StatusFileSize
new1.11 KB

keeping 8.8.0

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

tanubansal’s picture

None of the 9.1 patch is working.
Please suggest

greg.1.anderson’s picture

Status: Needs review » Closed (duplicate)

I think that this issue is completely covered in #3128631: Update dependencies composer/composer ^2 and composer/semver to ^3. Closing as a duplicate.