diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 71425e8..545a560 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -31,12 +31,12 @@ /** * The current system version. */ -const VERSION = '8.0-dev'; +const VERSION = Drupal::VERSION; /** * Core API compatibility. */ -const DRUPAL_CORE_COMPATIBILITY = '8.x'; +const DRUPAL_CORE_COMPATIBILITY = Drupal::CORE_COMPATIBILITY; /** * Minimum supported version of PHP. diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php index 6034a57..35816c2 100644 --- a/core/lib/Drupal.php +++ b/core/lib/Drupal.php @@ -77,6 +77,16 @@ class Drupal { /** + * The current system version. + */ + const VERSION = '8.0-dev'; + + /** + * Core API compatibility. + */ + const CORE_COMPATIBILITY = '8.x'; + + /** * The currently active container object. * * @var \Symfony\Component\DependencyInjection\ContainerInterface diff --git a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php index b23afb7..236cf04 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php @@ -79,7 +79,7 @@ class View extends ConfigEntityBase implements ViewStorageInterface { * * @var int */ - protected $core = DRUPAL_CORE_COMPATIBILITY; + protected $core = \Drupal::CORE_COMPATIBILITY; /** * Stores all display handlers of this view. diff --git a/core/modules/views/tests/Drupal/views/Tests/Plugin/Block/ViewsBlockTest.php b/core/modules/views/tests/Drupal/views/Tests/Plugin/Block/ViewsBlockTest.php index 1debfe8..5698fad 100644 --- a/core/modules/views/tests/Drupal/views/Tests/Plugin/Block/ViewsBlockTest.php +++ b/core/modules/views/tests/Drupal/views/Tests/Plugin/Block/ViewsBlockTest.php @@ -12,9 +12,6 @@ use Drupal\block\Plugin\views\display\Block; // @todo Remove this once the constant got converted. -if (!defined('DRUPAL_CORE_COMPATIBILITY')) { - define('DRUPAL_CORE_COMPATIBILITY', '8.x'); -} if (!defined('BLOCK_LABEL_VISIBLE')) { define('BLOCK_LABEL_VISIBLE', 'visible'); }