Problem/Motivation

The text is coming form @alexpott, see #2278383: Create an injectible service for drupal_set_message()

+++ b/core/includes/bootstrap.inc
@@ -487,12 +470,24 @@ function drupal_set_message($message = NULL, $type = 'status', $repeat = FALSE)
+  // Workaround for code that can not check if the service exists.
+  if (!\Drupal::hasService('messenger')) {
+    return [];
+  }

So without this code drush can not install Drupal 8. It would have been better if the comment had given the example because this is probably why this was here.

Well yes but then that needs deploying etc... and this won't make it into 8.2.x. I think the workaround is okay - it just needs better docs and maybe a test. You could use an isolated PHPUnit test to do this for example.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dawehner created an issue. See original summary.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jibran’s picture

Title: Test and document why drupal_set_message() has a workaround for a missing container » [PP-1] Test and document why drupal_set_message() has a workaround for a missing container
Status: Active » Postponed

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

larowlan’s picture

Status: Postponed » Closed (won't fix)

latest patch doesn't have the workaround