Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Framework-Bundle] Issue when redefining locks in different environments. #35920

Copy link
Copy link
Closed
@Messere

Description

@Messere
Issue body actions

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

  1. Create new symfony project:
composer create-project symfony/website-skeleton test_project`
  1. Edit test_project/config/packages/framework.yaml, add (under framework key):
    lock:
        payload: 'flock'
  1. Edit test_project/config/packages/test/framework.yaml, add (under framework key):
    lock:
        payload: 'flock://%kernel.project_dir%/var'
  1. Show configuration:
$ bin/console debug:config --env=prod framework
[ 8< ---- snip ---- 8<]
    lock:
        enabled: true
        resources:
            payload:
                - flock
[ 8< ---- snip ---- 8<]
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.