diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php index e95e80f558..1786c7f9bf 100644 --- a/core/lib/Drupal.php +++ b/core/lib/Drupal.php @@ -102,7 +102,16 @@ class Drupal { protected static $container; /** - * The currently active container object, or NULL if not initialized yet. + * The LegacyMessenger instance. + * + * Note: this is merely used to ensure that the instance survives when + * \Drupal::messenger() is invoked. It is required to ensure that messages + * are properly transferred to the proper Messenger service once the + * container is initialized. Do not store the Messenger service here. + * + * @todo Remove once LegacyMessenger has been removed before 9.0.0. + * + * @see https://www.drupal.org/node/2928994 * * @var \Drupal\Core\Messenger\LegacyMessenger|null */