The \Drupal class currently assumes that the container is set, and fails in a very unhelpful way when this assumption is not true:

PHP Fatal error: Call to a member function get() on a non-object in /var/www/d8/core/lib/Drupal.php on line 186

The attached patch instead throws an exception, and provides the method being called on \Drupal in the message.

CommentFileSizeAuthor
improve-pre-container-errors.patch9.01 KBmsonnabaum

Comments

Status: Needs review » Needs work

The last submitted patch, improve-pre-container-errors.patch, failed testing.

chx’s picture

Issue summary: View changes
Status: Needs work » Closed (duplicate)