should document that parameters are only shallow-merged

Created on 5 March 2024, 4 months ago
Updated 5 June 2024, about 1 month ago

Problem/Motivation allows the developer to override container parameters for debugging. However, \Drupal\Core\DependencyInjection\YamlFileLoader only does a shallow merge of these.

So for example, setting this to enable render cache debug output will crash the site:

    debug: true

because the renderer requires the required_cache_contexts.

This means that if you want to override only one key in a parameter, you have to specify the defaults for the others, thus:

    required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
      max-age: 0
      contexts: ['session', 'user']
      tags: []
    debug: true # This is the only value I am overriding.

This should be documented in

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report



10.3 ✨

DocumentationΒ  β†’

Last updated about 2 hours ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024