Issue #2646410 by claudiu.cristea, dawehner: Container cannot be saved to cache
parent
395fbab0b3
commit
9a2b5880af
|
@ -861,7 +861,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
|
|||
|
||||
// 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 @@ class UpdatePathTestBaseTest extends UpdatePathTestBase {
|
|||
// 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 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
|
||||
$autoloader = require_once 'autoload.php';
|
||||
|
||||
$kernel = new UpdateKernel('prod', $autoloader);
|
||||
$kernel = new UpdateKernel('prod', $autoloader, FALSE);
|
||||
$request = Request::createFromGlobals();
|
||||
|
||||
$response = $kernel->handle($request);
|
||||
|
|
Loading…
Reference in New Issue