Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal.php
index 3a1ecece44cea371d334316c6d10c2eb2aac2ea4..91d7032281004cb5addd7cae80f7bf3695a06cb3 100644 (file)
@@ -6,8 +6,9 @@
  */
 
 use Drupal\Core\DependencyInjection\ContainerNotInitializedException;
-use Symfony\Component\DependencyInjection\ContainerInterface;
+use Drupal\Core\Messenger\LegacyMessenger;
 use Drupal\Core\Url;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Static Service Container wrapper.
@@ -81,7 +82,7 @@ class Drupal {
   /**
    * The current system version.
    */
-  const VERSION = '8.4.6';
+  const VERSION = '8.5.3';
 
   /**
    * Core API compatibility.
@@ -757,4 +758,16 @@ class Drupal {
     return static::getContainer()->get('datetime.time');
   }
 
+  /**
+   * Returns the messenger.
+   *
+   * @return \Drupal\Core\Messenger\MessengerInterface
+   *   The messenger.
+   */
+  public static function messenger() {
+    // @todo Replace with service once LegacyMessenger is removed in 9.0.0.
+    // @see https://www.drupal.org/node/2928994
+    return new LegacyMessenger();
+  }
+
 }