The rebuildRootPackage() in src/PackageManager.php still references 8.0 as the version of drupal/core to be used, even though the comment says it should use the version from Drupal core's own composer.json file, which is 8.1 in my case.

    $root_package = JsonFile::read($this->root . '/composer.json');
    // Initialize known start values. These should match what's already in
    // the root composer.json shipped with Drupal.
    $root_package['replace'] = [
      'drupal/core' => '~8.0',
    ]

The code seems to do the opposite from what the comment just above it states... Is there a reason why it overrides the value provided by core?

Comments

stella created an issue. See original summary.

bojanz’s picture

We can make it stop doing that. Patches welcome.

I've been wanting to deprecate composer_manager since it's not needed with Drupal 8.1 (I haven't used it in months), but I've been waiting for drupal.org's Composer endpoint to stabilize a bit, so I can recommend it instead of Drupal Packagist.

  • bojanz committed 7ae213e on 8.x-1.x
    Issue #2734237: rebuildRootPackage() still references drupal/core 8.0
    
bojanz’s picture

Status: Active » Fixed

Pushed a fix.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.