Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal.php \Drupal::CORE_COMPATIBILITY
  2. 9 core/lib/Drupal.php \Drupal::CORE_COMPATIBILITY

Core API compatibility.

This constant is set to '8.x' to provide legacy compatibility with extensions that use the '8.x-' prefix to denote Drupal core major version compatibility, for example '8.x-1.0'. These extensions can specify compatibility with multiple major versions of Drupal core by setting the version constraint in 'core_version_requirement'. Drupal does not support using this core major version number prefix with versions greater than 8. For example '9.x-' prefixed extensions are not supported.

@todo Remove or rename this constant in https://www.drupal.org/i/3085662

3 uses of Drupal::CORE_COMPATIBILITY
Dependency::getConstraint in core/lib/Drupal/Core/Extension/Dependency.php
Gets the Constraint object.
ModuleDependencyMessageTrait::checkDependencyMessage in core/lib/Drupal/Core/Extension/ModuleDependencyMessageTrait.php
Provides messages for missing modules or incompatible dependencies.
update_get_update_list in core/includes/update.inc
Returns a list of all the pending database updates.

File

core/lib/Drupal.php, line 93

Class

Drupal
Static Service Container wrapper.

Code

const CORE_COMPATIBILITY = '8.x';