8000 FrameworkBundle workflows enabled configuration error · Issue #28662 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
FrameworkBundle workflows enabled configuration error #28662
Closed
@sandermarechal

Description

@sandermarechal

Symfony version(s) affected: 4.1.5

Description
The workflows configuration does not work as documented by condole config:dump-reference or console debug:config. The following configuration should be valid:

framework:
  workflows:
    enabled: true # explicitly enable workflows
    workflows:
      my_workflow:
        # ... workflow configuration

However, this configuration leads to the following error:

Unrecognized option "my_workflow" under "framework.workflows.workflows.workflows"

How to reproduce

Use the configuration above on a clean Symfony, then clear the cache.

Possible Solution
The bug seems to be caused in beforeNormalization() call for the workflow section (src/Bundle/FrameworkBundle/DependencyInjection/Configuration.php lines 218-236). When an enabled key is present, it deletes the key, then nests the rest of the configuration in an additional workflows key. This causes the workflows of the example config above to become invalid:

framework:
  workflows:
    enabled: true
    workflows:
      workflows:
        my_workflow:
          # ... workflow configuration

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

      0