Commit 9a2b5880 authored by catch's avatar catch

Issue #2646410 by claudiu.cristea, dawehner: Container cannot be saved to cache

parent 395fbab0
......@@ -861,7 +861,7 @@ protected function initializeContainer() {
// If needs dumping flag was set, dump the container.
if ($this->containerNeedsDumping && !$this->cacheDrupalContainer($container_definition)) {
$this->container->get('logger.factory')->get('DrupalKernel')->notice('Container cannot be saved to cache.');
$this->container->get('logger.factory')->get('DrupalKernel')->error('Container cannot be saved to cache.');
}
return $this->container;
......
......@@ -82,6 +82,17 @@ public function testUpdateHookN() {
// Increment the schema version.
\Drupal::state()->set('update_test_schema_version', 8001);
$this->runUpdates();
$select = \Drupal::database()->select('watchdog');
$select->orderBy('wid', 'DESC');
$select->range(0, 5);
$select->fields('watchdog', ['message']);
$container_cannot_be_saved_messages = array_filter(iterator_to_array($select->execute()), function($row) {
return strpos($row->message, 'Container cannot be saved to cache.') !== FALSE;
});
$this->assertEqual([], $container_cannot_be_saved_messages);
// Ensure schema has changed.
$this->assertEqual(drupal_get_installed_schema_version('update_test_schema', TRUE), 8001);
// Ensure the index was added for column a.
......
......@@ -13,7 +13,7 @@
$autoloader = require_once 'autoload.php';
$kernel = new UpdateKernel('prod', $autoloader);
$kernel = new UpdateKernel('prod', $autoloader, FALSE);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment