Closed
Closed
Copy link
Description
Symfony version(s) affected: 4.4.4, 5.0.5 (those two I've tested)
Description
Named locks configuration in framework.yaml cannot be overwritten in environment specific framework.yaml.
How to reproduce
- Create new symfony project:
composer create-project symfony/website-skeleton test_project`
- Edit
test_project/config/packages/framework.yaml
, add (underframework
key):
lock:
payload: 'flock'
- Edit
test_project/config/packages/test/framework.yaml
, add (underframework
key):
lock:
payload: 'flock://%kernel.project_dir%/var'
- Show configuration:
$ bin/console debug:config --env=prod framework
[ 8< ---- snip ---- 8<]
lock:
enabled: true
resources:
payload:
- flock
[ 8< ---- snip ---- 8<]
- So far, so good, now show configuration for test environment:
$ bin/console debug:config --env=test framework
In ContainerBuilder.php line 1320:
Invalid argument name "0LockStore" for service "lock.0.store": the first character must be a letter.
Additional context
I was debugging this issue for a while, at some point lock configuration looks like that:
[
"enabled" => true,
"resources" => [
"payload" => [0 => "flock"],
0 => [0 => "flock:////opt/project/var"]
]
]
so it looks like something's going wrong during config merge.