diff --git a/core/includes/install.inc b/core/includes/install.inc index 6e39ca5e40..5fe5b64fb2 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -1131,7 +1131,6 @@ function install_profile_info($profile, $langcode = 'en') { ]; $profile_path = drupal_get_path('profile', $profile); $info = \Drupal::service('info_parser')->parse("$profile_path/$profile.info.yml"); - $info += $defaults; $dependency_name_function = function ($dependency) { diff --git a/core/lib/Drupal/Core/Extension/InfoParserDynamic.php b/core/lib/Drupal/Core/Extension/InfoParserDynamic.php index ba0c6a7f4d..8f04afada5 100644 --- a/core/lib/Drupal/Core/Extension/InfoParserDynamic.php +++ b/core/lib/Drupal/Core/Extension/InfoParserDynamic.php @@ -12,15 +12,18 @@ class InfoParserDynamic implements InfoParserInterface { /** - * The earliest Drupal version that supports the 'core_version_requirement'. - */ + * The earliest Drupal version that supports the 'core_version_requirement'. + */ const FIRST_CORE_VERSION_REQUIREMENT_SUPPORTED_VERSION = '8.7.7'; /** - * The earliest Drupal version that supports the 'core_version_requirement'. + * The earliest Drupal version that supports 'composer.json' for dependencies. */ const FIRST_COMPOSER_JSON_SUPPORTED_VERSION = '8.8.0'; + /** + * The key for composer dependencies under extension 'info'. + */ const COMPOSER_DEPENDENCIES = 'composer_dependencies'; /** @@ -245,14 +248,14 @@ protected function parseComposerFile($filename) { if ($namespace !== 'drupal') { continue; } - if ($name === 'drupal') { + if ($name === 'core') { $parsed_info['core_version_requirement'] = $constraint; continue; } $parsed_info[static::COMPOSER_DEPENDENCIES][$name] = $constraint; } if (empty($parsed_info['core_version_requirement'])) { - throw new InfoParserException("The require key must at least specify a 'drupal/drupal' version in $filename"); + throw new InfoParserException("The require key must at least specify a 'drupal/core' version in $filename"); } return $parsed_info; } diff --git a/core/modules/system/tests/modules/composer_dependencies_test/composer.json b/core/modules/system/tests/modules/composer_dependencies_test/composer.json index 45606fd25f..d23f00a4e7 100644 --- a/core/modules/system/tests/modules/composer_dependencies_test/composer.json +++ b/core/modules/system/tests/modules/composer_dependencies_test/composer.json @@ -2,7 +2,7 @@ "name": "drupal/composer_dependencies_test", "type": "drupal-module", "require": { - "drupal/drupal": "^8.8", + "drupal/core": "^8.8", "drupal/common_test": "^2.4.2" } } diff --git a/core/modules/system/tests/modules/system_composer_dependencies_test/composer.json b/core/modules/system/tests/modules/system_composer_dependencies_test/composer.json index a3a400605a..b273b741a1 100644 --- a/core/modules/system/tests/modules/system_composer_dependencies_test/composer.json +++ b/core/modules/system/tests/modules/system_composer_dependencies_test/composer.json @@ -3,7 +3,7 @@ "description": "Support module for testing system composer dependencies.", "type": "drupal-module", "require": { - "drupal/drupal": "^8.8", + "drupal/core": "^8.8", "drupal/missing_composer_dependency": "^1" } } diff --git a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php index 6a076912f9..3fe4b36b65 100644 --- a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php @@ -463,7 +463,7 @@ public function testComposerJson() { "type": "drupal-module", "license": "GPL-2.0-or-later", "require": { - "drupal/drupal": "^8.8", + "drupal/core": "^8.8", "drupal/field": "~8.0", "smurfcore/log": "~1.0" }, @@ -494,7 +494,7 @@ public function testComposerJson() { } /** - * Tests a composer.json file with invalid 'drupal/drupal' value. + * Tests a composer.json file with invalid 'drupal/core' value. * * @covers ::parse */ @@ -515,7 +515,7 @@ public function testComposerInvalidCoreJson() { "type": "drupal-module", "license": "GPL-2.0-or-later", "require": { - "drupal/drupal": "^8.7.8", + "drupal/core": "^8.7.8", "drupal/field": "~8.0", "smurfcore/log": "~1.0" }, @@ -549,7 +549,7 @@ public function testComposerInvalidCoreJson() { } /** - * Tests composer.json file with 'drupal/drupal' specified. + * Tests composer.json file with 'drupal/core' specified. * * @covers ::parse */ @@ -584,7 +584,7 @@ public function testComposerJsonNoDrupal() { ], ]); $this->expectException('\Drupal\Core\Extension\InfoParserException'); - $this->expectExceptionMessage("The require key must at least specify a 'drupal/drupal' version in vfs://modules/fixtures_broken/composer.json"); + $this->expectExceptionMessage("The require key must at least specify a 'drupal/core' version in vfs://modules/fixtures_broken/composer.json"); $this->infoParser->parse(vfsStream::url('modules/fixtures_broken/common_no_dependencies.info.yml')); }