- π©πͺGermany osopolar π©πͺ GER π
The question in #5 from @almaudoh was not answered. AFAICS It's not necessary to copy the complete default.services.yml to services.yml but it might be necessary to copy/set all options for a parameter and not just the one which should get overridden.
Example:
Set
cookie_lifetime: 0
with following services.yml:parameters: session.storage.options: cookie_lifetime: 0
After setting above code in services.yml and rebuilding cache the output of
drush php:eval "var_export(\Drupal::getContainer()->getParameter('session.storage.options'))
is:array ( 'cookie_lifetime' => 0, )
Which is different to the output with no services.yml which is:
array ( 'gc_probability' => 1, 'gc_divisor' => 100, 'gc_maxlifetime' => 200000, 'cookie_lifetime' => 2000000, 'cookie_samesite' => 'Lax', 'sid_length' => 48, 'sid_bits_per_character' => 6, )
Therefore I assume that it might be necessary to define all options below for one parameter, at least if no defaults are defined by the corresponding service:
parameters: session.storage.options: gc_probability: 1 gc_divisor: 100 gc_maxlifetime: 200000 cookie_lifetime: 0 cookie_samesite: Lax sid_length: 48 sid_bits_per_character: 6
Is that assumption right?
Anyway, looking at \Drupal\Core\Session\SessionConfiguration::__construct() shows that defaults are defined, so at least in this case the missing options shouldn't be problematic.