diff --git a/core/lib/Drupal/Core/Extension/InfoParserDynamic.php b/core/lib/Drupal/Core/Extension/InfoParserDynamic.php index bc11cb8e9c..e135ff2197 100644 --- a/core/lib/Drupal/Core/Extension/InfoParserDynamic.php +++ b/core/lib/Drupal/Core/Extension/InfoParserDynamic.php @@ -11,6 +11,9 @@ */ class InfoParserDynamic implements InfoParserInterface { + /** + * The earliest version of Drupal that supports the 'core_dependency' key. + */ const FIRST_CORE_DEPENDENCY_SUPPORTED_VERSION = '8.7.7'; /** @@ -61,7 +64,7 @@ public function parse($filename) { throw new InfoParserException("Invalid 'core' value \"{$parsed_info['core']}\" in " . $filename); } if (isset($parsed_info['core_dependency'])) { - $supports_pre_core_dependency_version = $this->isConstraintSatisfiedByPreCoreDependencyCoreVersion($parsed_info['core_dependency']); + $supports_pre_core_dependency_version = static::isConstraintSatisfiedByPreCoreDependencyCoreVersion($parsed_info['core_dependency']); // If the 'core_dependency' constraint does not satisfy any Drupal 8 // versions before 8.7.7 then 'core' cannot be set or it will // effectively support all versions of Drupal 8 because @@ -131,7 +134,7 @@ protected function getRequiredKeys() { * TRUE if the constraint is satisfied by a core version that does not * support the 'core_dependency' key in info.yml files. */ - protected function isConstraintSatisfiedByPreCoreDependencyCoreVersion($constraint) { + static protected function isConstraintSatisfiedByPreCoreDependencyCoreVersion($constraint) { static $evaluated_constraints = []; if (!isset($evaluated_constraints[$constraint])) { foreach (range(0, 7) as $minor) { @@ -154,7 +157,6 @@ protected function isConstraintSatisfiedByPreCoreDependencyCoreVersion($constrai return $evaluated_constraints[$constraint]; } } - } } } diff --git a/core/modules/system/tests/modules/update_test_semver_update_n/update_test_semver_update_n.install b/core/modules/system/tests/modules/update_test_semver_update_n/update_test_semver_update_n.install index d00ff0cfe5..aacb595710 100644 --- a/core/modules/system/tests/modules/update_test_semver_update_n/update_test_semver_update_n.install +++ b/core/modules/system/tests/modules/update_test_semver_update_n/update_test_semver_update_n.install @@ -6,7 +6,7 @@ */ /** - * Update 8002. + * Update 8001. */ function update_test_semver_update_n_update_8001() { \Drupal::state()->set('update_test_semver_update_n_update_8001', 'Yes, I was run. Thanks for testing!'); diff --git a/core/modules/system/tests/src/Functional/System/ThemeTest.php b/core/modules/system/tests/src/Functional/System/ThemeTest.php index 9d028b49d8..8c89f0c8a5 100644 --- a/core/modules/system/tests/src/Functional/System/ThemeTest.php +++ b/core/modules/system/tests/src/Functional/System/ThemeTest.php @@ -482,7 +482,7 @@ public function testThemeSettingsNoLogoNoFavicon() { * * @param string $theme_name * Theme name to select element on page. This can be a partial name. - * @param $expected_text + * @param string $expected_text * The expected incompatibility text. */ private function assertThemeIncompatibleText($theme_name, $expected_text) {