Issue #2315613 by damiankloip, Wim Leers: Add a services.local.yml for development.

8.0.x
Nathaniel Catchpole 2014-08-07 11:48:11 +01:00
parent 23944a1e34
commit e5a896b9f4
4 changed files with 16 additions and 7 deletions

View File

@ -38,10 +38,6 @@ services:
class: Drupal\Core\Cache\ApcuBackendFactory
cache.backend.php:
class: Drupal\Core\Cache\PhpBackendFactory
cache.backend.memory:
class: Drupal\Core\Cache\MemoryBackendFactory
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
cache.bootstrap:
class: Drupal\Core\Cache\CacheBackendInterface
tags:

View File

@ -526,8 +526,8 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
}
}
}
if (!empty($GLOBALS['conf']['container_yamls'])) {
$this->serviceYamls['site'] = $GLOBALS['conf']['container_yamls'];
if ($container_yamls = Settings::get('container_yamls')) {
$this->serviceYamls['site'] = $container_yamls;
}
if (file_exists($site_services_yml = $this->getSitePath() . '/services.yml')) {
$this->serviceYamls['site'][] = $site_services_yml;

View File

@ -0,0 +1,9 @@
# Local development services.
#
# To activate this feature, follow the instructions at the top of the
# 'example.settings.local.php' file, which sits next to this file.
services:
cache.backend.memory:
class: Drupal\Core\Cache\MemoryBackendFactory
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory

View File

@ -10,6 +10,9 @@
* mention 'settings.local.php'.
*/
// Enable local development services.
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
// Show all error messages, with backtrace information.
$config['system.logging']['error_level'] = 'verbose';
@ -17,7 +20,8 @@ $config['system.logging']['error_level'] = 'verbose';
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
// Disable the render cache, by using the Null cache back-end.
// Disable the render cache, by using the Null cache back-end defined by the
// development.services.yml file above.
$settings['cache']['bins']['render'] = 'cache.backend.null';
/**