Problem/Motivation
Branching off of a suggestion from https://www.drupal.org/project/drupal/issues/3278493 this proposal is to update development.settings.yml to include Twig debugging by default.
As it currently stands, the process for enabling Twig debugging requires the user to uncomment some settings from settings.local.php then adding in the twig debugging settings to development.settings.yml. This is not a very beginner-friendly process.
example.settings.local.php is filled with helpful comments and information regarding what each option does and if it should be uncommented or changed for various purposes. In contrast, development.settings.yml has very little information and requires the user to add in additional information that they would not otherwise know about. Twig debugging is one of the most important features to enable when building a theme and it makes sense that it should be enabled by default in development.settings.yml or at least the settings should be in the file but commented out with an explanation about what would happen if they are uncommented.
Proposed resolution
Currently development.settings.yml looks like this:
parameters:
http.response.debug_cacheability_headers: true
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
This would update the file to look like this:
parameters:
http.response.debug_cacheability_headers: true
# Twig debugging settings for explanation of what each option does, see:
# https://www.drupal.org/docs/theming-drupal/twig-in-drupal/debugging-compiled-twig-templates#options
twig.config:
# Html comments for Twig templates: set to true to enable
debug: true
# Caching the Twig templates in the Render API:
# set to false to disable caching so a re-render happens
# every time a template is updated
cache: false
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
Remaining tasks
Get DX feedback