When I going to Disable Twig template cache , Fatal error . i.e
The website encountered an unexpected error. Please try again later. Error: Unsupported operand types in Drupal\Core\Template\TwigEnvironment->__construct() (line 69 of core\lib\Drupal\Core\Template\TwigEnvironment.php).
I followed below steps :
1.Copy and rename the file from sites/example.settings.local.php to sites/default/settings.local.php 2.Open settings.php file in sites/default and uncomment these lines:
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
include $app_root . '/' . $site_path . '/settings.local.php';
}
3.Uncomment these lines in settings.local.php
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
Open development.services.yml in the sites folder and add the following code
parameters: twig.config: debug: true auto_reload: true cache: false
Rebuild the cache and your good to go
My development.services.yml code :
parameters:
http.response.debug_cacheability_headers: true
twig.config:
debug: true
auto_reload: true
cache: false
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
development.services.yml
you've edited. Can you post the entire file?