Commit 4fb0f9d8 authored by webchick's avatar webchick

Issue #2251113 by alexpott, damiankloip, Crell, Wim Leers, dawehner, sun: Use...

Issue #2251113 by alexpott, damiankloip, Crell, Wim Leers, dawehner, sun: Use container parameters instead of settings.
parent de5fe262
......@@ -147,26 +147,30 @@ INSTALLATION
b. Missing settings file.
Drupal will try to automatically create a settings.php configuration file,
which is normally in the directory sites/default (to avoid problems when
upgrading, Drupal is not packaged with this file). If auto-creation fails,
you will need to create this file yourself, using the file
sites/default/default.settings.php as a template.
Drupal will try to automatically create settings.php and services.yml
files, which are normally in the directory sites/default (to avoid
problems when upgrading, Drupal is not packaged with this file). If
auto-creation of either file fails, you will need to create the file
yourself. Use the template sites/default/default.settings.php or
sites/default/default.services.yml respectively.
For example, on a Unix/Linux command line, you can make a copy of the
default.settings.php file with the command:
default.settings.php and default.services.yml files with the commands:
cp sites/default/default.settings.php sites/default/settings.php
cp sites/default/default.services.yml sites/default/services.yml
Next, grant write privileges to the file to everyone (including the web
server) with the command:
chmod a+w sites/default/settings.php
chmod a+w sites/default/services.yml
Be sure to set the permissions back after the installation is finished!
Sample command:
chmod go-w sites/default/settings.php
chmod go-w sites/default/services.yml
c. Write permissions after install.
......@@ -176,6 +180,7 @@ INSTALLATION
from a Unix/Linux command line:
chmod go-w sites/default/settings.php
chmod go-w sites/default/services.yml
chmod go-w sites/default
4. Verify that the site is working.
......
parameters:
twig.config: {}
factory.keyvalue:
default: keyvalue.database
factory.keyvalue.expirable:
default: keyvalue.expirable.database
services:
cache_factory:
class: Drupal\Core\Cache\CacheFactory
......@@ -156,13 +162,13 @@ services:
arguments: ['@request_stack', '@url_generator']
keyvalue:
class: Drupal\Core\KeyValueStore\KeyValueFactory
arguments: ['@service_container', '@settings']
arguments: ['@service_container', '%factory.keyvalue%']
keyvalue.database:
class: Drupal\Core\KeyValueStore\KeyValueDatabaseFactory
arguments: ['@serialization.phpserialize', '@database']
keyvalue.expirable:
class: Drupal\Core\KeyValueStore\KeyValueExpirableFactory
arguments: ['@service_container', '@settings']
arguments: ['@service_container', '%factory.keyvalue.expirable%']
keyvalue.expirable.database:
class: Drupal\Core\KeyValueStore\KeyValueDatabaseExpirableFactory
arguments: ['@serialization.phpserialize', '@database']
......@@ -922,6 +928,28 @@ services:
arguments: ['@module_handler']
info_parser:
class: Drupal\Core\Extension\InfoParser
twig:
class: Drupal\Core\Template\TwigEnvironment
arguments: ['@twig.loader', '@module_handler', '@theme_handler', '%twig.config%']
tags:
- { name: service_collector, tag: 'twig.extension', call: addExtension }
twig.extension:
class: Drupal\Core\Template\TwigExtension
tags:
- { name: twig.extension, priority: 100 }
calls:
- [setGenerators, ['@url_generator']]
# @todo Figure out what to do about debugging functions.
# @see http://drupal.org/node/1804998
twig.extension.debug:
class: Twig_Extension_Debug
tags:
- { name: twig.extension }
twig.loader:
alias: twig.loader.filesystem
twig.loader.filesystem:
class: Twig_Loader_Filesystem
arguments: ['%app.root%']
element_info:
alias: plugin.manager.element_info
file.mime_type.guesser:
......
This diff is collapsed.
......@@ -18,10 +18,6 @@
use Drupal\Core\DependencyInjection\Compiler\RegisterAccessChecksPass;
use Drupal\Core\DependencyInjection\Compiler\RegisterServicesForDestructionPass;
use Drupal\Core\Plugin\PluginManagerPass;
use Drupal\Core\Site\Settings;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
/**
......@@ -42,7 +38,8 @@ class CoreServiceProvider implements ServiceProviderInterface {
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
$this->registerTwig($container);
$container->setParameter('app.root', DRUPAL_ROOT);
$this->registerUuid($container);
$this->registerTest($container);
......@@ -72,44 +69,6 @@ public function register(ContainerBuilder $container) {
$container->addCompilerPass(new PluginManagerPass());
}
/**
* Registers Twig services.
*
* This method is public and static so that it can be reused in the installer.
*/
public static function registerTwig(ContainerBuilder $container) {
$container->register('twig.loader.filesystem', 'Twig_Loader_Filesystem')
->addArgument(DRUPAL_ROOT);
$container->setAlias('twig.loader', 'twig.loader.filesystem');
$twig_extension = new Definition('Drupal\Core\Template\TwigExtension');
$twig_extension->addMethodCall('setGenerators', array(new Reference('url_generator')));
$container->register('twig', 'Drupal\Core\Template\TwigEnvironment')
->addArgument(new Reference('twig.loader'))
->addArgument(array(
// This is saved / loaded via drupal_php_storage().
// All files can be refreshed by clearing caches.
// @todo ensure garbage collection of expired files.
// When in the installer, twig_cache must be FALSE until we know the
// files folder is writable.
'cache' => drupal_installation_attempted() ? FALSE : Settings::get('twig_cache', TRUE),
'autoescape' => TRUE,
'debug' => Settings::get('twig_debug', FALSE),
'auto_reload' => Settings::get('twig_auto_reload', NULL),
))
->addArgument(new Reference('module_handler'))
->addArgument(new Reference('theme_handler'))
->addMethodCall('addExtension', array($twig_extension))
// @todo Figure out what to do about debugging functions.
// @see http://drupal.org/node/1804998
->addMethodCall('addExtension', array(new Definition('Twig_Extension_Debug')))
->addTag('service_collector', array(
'tag' => 'twig.extension',
'call' => 'addExtension',
));
}
/**
* Determines and registers the UUID service.
*
......
......@@ -52,6 +52,14 @@ public function __construct(ContainerBuilder $container)
$this->container = $container;
}
/**
* Resets the internal cache. This method is mostly useful for tests.
*/
public static function reset()
{
static::$yaml = array();
}
/**
* Loads a Yaml file.
*
......
......@@ -529,7 +529,8 @@ public function discoverServiceProviders() {
if ($container_yamls = Settings::get('container_yamls')) {
$this->serviceYamls['site'] = $container_yamls;
}
if (file_exists($site_services_yml = $this->getSitePath() . '/services.yml')) {
$site_services_yml = $this->getSitePath() . '/services.yml';
if (file_exists($site_services_yml) && is_readable($site_services_yml)) {
$this->serviceYamls['site'][] = $site_services_yml;
}
}
......
......@@ -60,6 +60,11 @@ public function register(ContainerBuilder $container) {
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
// Disable Twig cache (php storage does not exist yet).
$twig_config = $container->getParameter('twig.config');
$twig_config['cache'] = FALSE;
$container->setParameter('twig.config', $twig_config);
// Disable configuration overrides.
// ConfigFactory would to try to load language overrides and InstallStorage
// throws an exception upon trying to load a non-existing file.
......
......@@ -7,7 +7,6 @@
namespace Drupal\Core\KeyValueStore;
use Drupal\Core\Site\Settings;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -29,7 +28,7 @@ class KeyValueFactory implements KeyValueFactoryInterface {
* This is a setting name that will be used if the specific setting does not
* exist. The setting value will be the id of a service.
*/
const DEFAULT_SETTING = 'keyvalue_default';
const DEFAULT_SETTING = 'default';
/**
* The default service id.
......@@ -50,22 +49,15 @@ class KeyValueFactory implements KeyValueFactoryInterface {
*/
protected $container;
/**
* The read-only settings container.
*
* @var \Drupal\Core\Site\Settings
*/
protected $settings;
/**
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* The service container.
* @param \Drupal\Core\Site\Settings $settings
* The read-only settings container.
* @param array $options
* (optional) Collection-specific storage override options.
*/
function __construct(ContainerInterface $container, Settings $settings) {
function __construct(ContainerInterface $container, array $options = array()) {
$this->container = $container;
$this->settings = $settings;
$this->options = $options;
}
/**
......@@ -73,14 +65,16 @@ function __construct(ContainerInterface $container, Settings $settings) {
*/
public function get($collection) {
if (!isset($this->stores[$collection])) {
if ($service_name = $this->settings->get(static::SPECIFIC_PREFIX . $collection)) {
if (isset($this->options[$collection])) {
$service_id = $this->options[$collection];
}
elseif ($service_name = $this->settings->get(static::DEFAULT_SETTING)) {
elseif (isset($this->options[static::DEFAULT_SETTING])) {
$service_id = $this->options[static::DEFAULT_SETTING];
}
else {
$service_name = static::DEFAULT_SERVICE;
$service_id = static::DEFAULT_SERVICE;
}
$this->stores[$collection] = $this->container->get($service_name)->get($collection);
$this->stores[$collection] = $this->container->get($service_id)->get($collection);
}
return $this->stores[$collection];
}
......
......@@ -41,7 +41,7 @@ class TwigEnvironment extends \Twig_Environment {
* Constructs a TwigEnvironment object and stores cache and storage
* internally.
*/
public function __construct(\Twig_LoaderInterface $loader = NULL, $options = array(), ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) {
public function __construct(\Twig_LoaderInterface $loader = NULL, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler, $options = array()) {
// @todo Pass as arguments from the DIC.
$this->cache_object = \Drupal::cache();
......@@ -68,6 +68,16 @@ public function __construct(\Twig_LoaderInterface $loader = NULL, $options = arr
$this->templateClasses = array();
$this->stringLoader = new \Twig_Loader_String();
$options += array(
// @todo Ensure garbage collection of expired files.
'cache' => TRUE,
// @todo Remove this.
// @see http://drupal.org/node/1712444
'autoescape' => FALSE,
'debug' => FALSE,
'auto_reload' => NULL,
);
parent::__construct($loader, $options);
}
......
......@@ -15,6 +15,7 @@
use Drupal\Core\Language\Language;
use Drupal\Core\Site\Settings;
use Drupal\Core\Entity\Schema\EntitySchemaProviderInterface;
use Symfony\Component\DependencyInjection\Parameter;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpFoundation\Request;
......@@ -260,7 +261,9 @@ public function containerBuild(ContainerBuilder $container) {
->addArgument(Database::getConnection())
->addArgument('config');
$this->settingsSet('keyvalue_default', 'keyvalue.memory');
$keyvalue_options = $container->getParameter('factory.keyvalue') ?: array();
$keyvalue_options['default'] = 'keyvalue.memory';
$container->setParameter('factory.keyvalue', $keyvalue_options);
$container->set('keyvalue.memory', $this->keyValueFactory);
if (!$container->has('keyvalue')) {
// TestBase::setUp puts a completely empty container in
......@@ -280,7 +283,7 @@ public function containerBuild(ContainerBuilder $container) {
$container
->register('keyvalue', 'Drupal\Core\KeyValueStore\KeyValueFactory')
->addArgument(new Reference('service_container'))
->addArgument(new Reference('settings'));
->addArgument(new Parameter('factory.keyvalue'));
$container->register('state', 'Drupal\Core\State\State')
->addArgument(new Reference('keyvalue'));
......
......@@ -8,9 +8,11 @@
namespace Drupal\simpletest;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Serialization\Yaml;
use Drupal\Component\Utility\Crypt;
use Drupal\Component\Utility\NestedArray;
use Drupal\Component\Utility\String;
use Drupal\Core\DependencyInjection\YamlFileLoader;
use Drupal\Core\DrupalKernel;
use Drupal\Core\Database\Database;
use Drupal\Core\Database\ConnectionNotDefinedException;
......@@ -812,6 +814,7 @@ protected function setUp() {
// Not using File API; a potential error must trigger a PHP warning.
$directory = DRUPAL_ROOT . '/' . $this->siteDirectory;
copy(DRUPAL_ROOT . '/sites/default/default.settings.php', $directory . '/settings.php');
copy(DRUPAL_ROOT . '/sites/default/default.services.yml', $directory . '/services.yml');
// All file system paths are created by System module during installation.
// @see system_requirements()
......@@ -1018,6 +1021,26 @@ protected function writeSettings(array $settings) {
drupal_rewrite_settings($settings, $filename);
}
/**
* Changes parameters in the services.yml file.
*
* @param $name
* The name of the parameter.
* @param $value
* The value of the parameter.
*/
protected function setContainerParameter($name, $value) {
$filename = $this->siteDirectory . '/services.yml';
chmod($filename, 0666);
$services = Yaml::decode(file_get_contents($filename));
$services['parameters'][$name] = $value;
file_put_contents($filename, Yaml::encode($services));
// Clear the YML file cache.
YamlFileLoader::reset();
}
/**
* Queues custom translations to be written to settings.php.
*
......
......@@ -7,6 +7,7 @@
namespace Drupal\system\Tests\KeyValueStore;
use Drupal\Core\KeyValueStore\KeyValueFactory;
use Symfony\Component\DependencyInjection\Reference;
/**
......@@ -33,7 +34,9 @@ protected function setUp() {
->addArgument(new Reference('database'));
$this->container
->register('serialization.phpserialize', 'Drupal\Component\Serialization\PhpSerialize');
$this->settingsSet('keyvalue_expirable_default', 'keyvalue.expirable.database');
$parameter = array();
$parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.expirable.database';
$this->container->setParameter('factory.keyvalue.expirable', $parameter);
}
protected function tearDown() {
......
......@@ -7,6 +7,7 @@
namespace Drupal\system\Tests\KeyValueStore;
use Drupal\Core\KeyValueStore\KeyValueFactory;
use Symfony\Component\DependencyInjection\Reference;
/**
......@@ -32,7 +33,9 @@ protected function setUp() {
->addArgument(new Reference('database'));
$this->container
->register('serialization.phpserialize', 'Drupal\Component\Serialization\PhpSerialize');
$this->settingsSet('keyvalue_default', 'keyvalue.database');
$parameter = array();
$parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.database';
$this->container->setParameter('factory.keyvalue', $parameter);
}
protected function tearDown() {
......
......@@ -6,6 +6,7 @@
*/
namespace Drupal\system\Tests\KeyValueStore;
use Drupal\Core\KeyValueStore\KeyValueFactory;
/**
* Tests the key-value memory storage.
......@@ -25,7 +26,9 @@ protected function setUp() {
parent::setUp();
$this->container
->register('keyvalue.memory', 'Drupal\Core\KeyValueStore\KeyValueMemoryFactory');
$this->settingsSet('keyvalue_default', 'keyvalue.memory');
$parameter = array();
$parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.memory';
$this->container->setParameter('factory.keyvalue', $parameter);
}
}
......@@ -58,11 +58,11 @@ protected function setUp() {
$this->container
->register('keyvalue', 'Drupal\Core\KeyValueStore\KeyValueFactory')
->addArgument(new Reference('service_container'))
->addArgument(new Reference('settings'));
->addArgument('%factory.keyvalue%');
$this->container
->register('keyvalue.expirable', 'Drupal\Core\KeyValueStore\KeyValueExpirableFactory')
->addArgument(new Reference('service_container'))
->addArgument(new Reference('settings'));
->addArgument('%factory.keyvalue.expirable%');
// Define two data collections,
$this->collections = array(0 => 'zero', 1 => 'one');
......
......@@ -31,7 +31,9 @@ function testTwigDebugMarkup() {
theme_enable(array('test_theme'));
\Drupal::config('system.theme')->set('default', 'test_theme')->save();
// Enable debug, rebuild the service container, and clear all caches.
$this->settingsSet('twig_debug', TRUE);
$parameters = $this->container->getParameter('twig.config');
$parameters['debug'] = TRUE;
$this->setContainerParameter('twig.config', $parameters);
$this->rebuildContainer();
$this->resetAll();
......@@ -67,7 +69,9 @@ function testTwigDebugMarkup() {
$this->assertTrue(strpos($output, '* node--foo--bar' . $extension . PHP_EOL . ' * node--foo' . $extension . PHP_EOL . ' * node--3--full' . $extension . PHP_EOL . ' * node--3' . $extension . PHP_EOL . ' * node--page--full' . $extension . PHP_EOL . ' * node--page' . $extension . PHP_EOL . ' * node--full' . $extension . PHP_EOL . ' x node' . $extension) !== FALSE, 'Suggested template files found in order and base template shown as current template.');
// Disable debug, rebuild the service container, and clear all caches.
$this->settingsSet('twig_debug', FALSE);
$parameters = $this->container->getParameter('twig.config');
$parameters['debug'] = FALSE;
$this->setContainerParameter('twig.config', $parameters);
$this->rebuildContainer();
$this->resetAll();
......
......@@ -29,14 +29,18 @@ class TwigSettingsTest extends WebTestBase {
*/
function testTwigAutoReloadOverride() {
// Enable auto reload and rebuild the service container.
$this->settingsSet('twig_auto_reload', TRUE);
$parameters = $this->container->getParameter('twig.config');
$parameters['auto_reload'] = TRUE;
$this->setContainerParameter('twig.config', $parameters);
$this->rebuildContainer();
// Check isAutoReload() via the Twig service container.
$this->assertTrue($this->container->get('twig')->isAutoReload(), 'Automatic reloading of Twig templates enabled.');
// Disable auto reload and check the service container again.
$this->settingsSet('twig_auto_reload', FALSE);
$parameters = $this->container->getParameter('twig.config');
$parameters['auto_reload'] = FALSE;
$this->setContainerParameter('twig.config', $parameters);
$this->rebuildContainer();
$this->assertFalse($this->container->get('twig')->isAutoReload(), 'Automatic reloading of Twig templates disabled.');
......@@ -47,7 +51,9 @@ function testTwigAutoReloadOverride() {
*/
function testTwigDebugOverride() {
// Enable debug and rebuild the service container.
$this->settingsSet('twig_debug', TRUE);
$parameters = $this->container->getParameter('twig.config');
$parameters['debug'] = TRUE;
$this->setContainerParameter('twig.config', $parameters);
$this->rebuildContainer();
// Check isDebug() via the Twig service container.
......@@ -55,12 +61,16 @@ function testTwigDebugOverride() {
$this->assertTrue($this->container->get('twig')->isAutoReload(), 'Twig automatic reloading is enabled when debug is enabled.');
// Override auto reload when debug is enabled.
$this->settingsSet('twig_auto_reload', FALSE);
$parameters = $this->container->getParameter('twig.config');
$parameters['auto_reload'] = FALSE;
$this->setContainerParameter('twig.config', $parameters);
$this->rebuildContainer();
$this->assertFalse($this->container->get('twig')->isAutoReload(), 'Twig automatic reloading can be disabled when debug is enabled.');
// Disable debug and check the service container again.
$this->settingsSet('twig_debug', FALSE);
$parameters = $this->container->getParameter('twig.config');
$parameters['debug'] = FALSE;
$this->setContainerParameter('twig.config', $parameters);
$this->rebuildContainer();
$this->assertFalse($this->container->get('twig')->isDebug(), 'Twig debug disabled.');
......@@ -98,7 +108,9 @@ function testTwigCacheOverride() {
$this->assertTrue(PhpStorageFactory::get('twig')->exists($cache_filename), 'Cached Twig template found.');
// Disable the Twig cache and rebuild the service container.
$this->settingsSet('twig_cache', FALSE);
$parameters = $this->container->getParameter('twig.config');
$parameters['cache'] = FALSE;
$this->setContainerParameter('twig.config', $parameters);
$this->rebuildContainer();
// This should return false after rebuilding the service container.
......
......@@ -219,7 +219,7 @@ function system_requirements($phase) {
if (!drupal_verify_install_file($conf_path, FILE_NOT_WRITABLE, 'dir')) {
$conf_errors[] = t("The directory %file is not protected from modifications and poses a security risk. You must change the directory's permissions to be non-writable.", array('%file' => $conf_path));
}
foreach (array('settings.php', 'settings.local.php') as $conf_file) {
foreach (array('settings.php', 'settings.local.php', 'services.yml') as $conf_file) {
$full_path = $conf_path . '/' . $conf_file;
if (file_exists($full_path) && !drupal_verify_install_file($full_path, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE)) {
$conf_errors[] = t("The file %file is not protected from modifications and poses a security risk. You must change the file's permissions to be non-writable.", array('%file' => $full_path));
......@@ -236,18 +236,18 @@ function system_requirements($phase) {
);
$description = drupal_render($item_list);
}
$requirements['settings.php'] = array(
$requirements['configuration_files'] = array(
'value' => t('Not protected'),
'severity' => REQUIREMENT_ERROR,
'description' => $description,
);
}
else {
$requirements['settings.php'] = array(
$requirements['configuration_files'] = array(
'value' => t('Protected'),
);
}
$requirements['settings.php']['title'] = t('Configuration files');
$requirements['configuration_files']['title'] = t('Configuration files');
}
// Test the contents of the .htaccess files.
......
parameters:
twig.config:
# Twig debugging:
#
# When debugging is enabled:
# - The markup of each Twig template is surrounded by HTML comments that
# contain theming information, such as template file name suggestions.
# - Note that this debugging markup will cause automated tests that directly
# check rendered HTML to fail. When running automated tests, 'twig_debug'
# should be set to FALSE.
# - The dump() function can be used in Twig templates to output information
# about template variables.
# - Twig templates are automatically recompiled whenever the source code
# changes (see twig_auto_reload below).
#
# For more information about debugging Twig templates, see
# http://drupal.org/node/1906392.
#
# Not recommended in production environments
# @default false
debug: false
# Twig auto-reload:
#
# Automatically recompile Twig templates whenever the source code changes.
# If you don't provide a value for twig_auto_reload, it will be determined
# based on the value of twig_debug.
#
# Not recommended in production environments
# @default null
auto_reload: null
# Twig cache:
#
# By default, Twig templates will be compiled and stored in the filesystem
# to increase performance. Disabling the Twig cache will recompile the
# templates from source each time they are used. In most cases the
# twig_auto_reload setting above should be enabled rather than disabling the
# Twig cache.
#
# Not recommended in production environments
# @default true
cache: true
factory.keyvalue:
{}
# Default key/value storage service to use.
# @default keyvalue.database
#default: keyvalue.database
# Collection-specific overrides.
#state: keyvalue.database
factory.keyvalue.expirable:
{}
# Default key/value expirable storage service to use.
# @default keyvalue.database.expirable
#default: keyvalue.database.expirable
......@@ -46,56 +46,3 @@
* using these parameters in a request to rebuild.php.
*/
$settings['rebuild_access'] = TRUE;
/**
* Twig debugging:
*
* When debugging is enabled:
* - The markup of each Twig template is surrounded by HTML comments that
* contain theming information, such as template file name suggestions.
* - Note that this debugging markup will cause automated tests that directly
* check rendered HTML to fail. When running automated tests, 'twig_debug'
* should be set to FALSE.
* - The dump() function can be used in Twig templates to output information
* about template variables.
* - Twig templates are automatically recompiled whenever the source code
* changes (see twig_auto_reload below).
*
* Note: changes to this setting will only take effect once the cache is
* cleared.
*
* For more information about debugging Twig templates, see
* http://drupal.org/node/1906392.
*
* Not recommended in production environments (Default: FALSE).
*/
# $settings['twig_debug'] = TRUE;
/**
* Twig auto-reload:
*
* Automatically recompile Twig templates whenever the source code changes. If
* you don't provide a value for twig_auto_reload, it will be determined based
* on the value of twig_debug.
*
* Note: changes to this setting will only take effect once the cache is
* cleared.
*
* Not recommended in production environments (Default: NULL).
*/
# $settings['twig_auto_reload'] = TRUE;
/**
* Twig cache:
*
* By default, Twig templates will be compiled and stored in the filesystem to
* increase performance. Disabling the Twig cache will recompile the templates
* from source each time they are used. In most cases the twig_auto_reload
* setting above should be enabled rather than disabling the Twig cache.
*
* Note: changes to this setting will only take effect once the cache is
* cleared.
*
* Not recommended in production environments (Default: TRUE).
*/
# $settings['twig_cache'] = FALSE;
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