Unverified Commit 6aee1497 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3105701 by tedbow, xjm, Gábor Hojtsy, Krzysztof Domański, dww, Wim...

Issue #3105701 by tedbow, xjm, Gábor Hojtsy, Krzysztof Domański, dww, Wim Leers, jungle: Do not allow core: 9.x in info.yml files
parent 8ed835c0
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ public function parse($filename) {
      if (!empty($missing_keys)) {
        throw new InfoParserException('Missing required keys (' . implode(', ', $missing_keys) . ') in ' . $filename);
      }
      if (!isset($parsed_info['core']) && !isset($parsed_info['core_version_requirement'])) {
      if (!isset($parsed_info['core_version_requirement'])) {
        if (strpos($filename, 'core/') === 0 || strpos($filename, $this->root . '/core/') === 0) {
          // Core extensions do not need to specify core compatibility: they are
          // by definition compatible so a sensible default is used. Core
@@ -70,12 +70,9 @@ public function parse($filename) {
        }
        else {
          // Non-core extensions must specify core compatibility.
          throw new InfoParserException("The 'core' or the 'core_version_requirement' key must be present in " . $filename);
          throw new InfoParserException("The 'core_version_requirement' key must be present in " . $filename);
        }
      }
      if (isset($parsed_info['core']) && !preg_match("/^\d\.x$/", $parsed_info['core'])) {
        throw new InfoParserException("Invalid 'core' value \"{$parsed_info['core']}\" in " . $filename);
      }
      if (isset($parsed_info['core_version_requirement'])) {
        try {
          $supports_pre_core_version_requirement_version = static::isConstraintSatisfiedByPreviousVersion($parsed_info['core_version_requirement'], static::FIRST_CORE_VERSION_REQUIREMENT_SUPPORTED_VERSION);
@@ -99,6 +96,9 @@ public function parse($filename) {
          throw new InfoParserException("The 'core_version_requirement' can not be used to specify compatibility for a specific version before " . static::FIRST_CORE_VERSION_REQUIREMENT_SUPPORTED_VERSION . " in $filename");
        }
      }
      if (isset($parsed_info['core']) && $parsed_info['core'] !== '8.x') {
        throw new InfoParserException("'core: {$parsed_info['core']}' is not supported. Use 'core_version_requirement' to specify core compatibility. Only 'core: 8.x' is supported to provide backwards compatibility for Drupal 8 when needed in $filename");
      }

      // Determine if the extension is compatible with the current version of
      // Drupal core.
+0 −1
Original line number Diff line number Diff line
name: 'Database Statement Monitoring Test'
type: module
description: 'Support module for Database layer tests that need to monitor executed database statements.'
core: 8.x
package: Testing
version: VERSION
+0 −1
Original line number Diff line number Diff line
name: 'Delay Cache Tags Invalidation Test'
type: module
core: 8.x
package: Testing
version: VERSION
+1 −1
Original line number Diff line number Diff line
@@ -4,4 +4,4 @@ description: 'Support module for testing system dependencies.'
package: Testing
version: VERSION
dependencies:
  - drupal:system_incompatible_core_version_test
  - drupal:system_core_incompatible_semver_test
+0 −6
Original line number Diff line number Diff line
name: 'System incompatible core version test'
type: module
description: 'Support module for testing system dependencies.'
package: Testing
version: VERSION
core: 5.x
Loading