10000 [Config] YamlReferenceDumper: No default value required for VariableNode with array example by Nyholm · Pull Request #39336 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Config] YamlReferenceDumper: No default value required for VariableNode with array example #39336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Nyholm
Copy link
Member
@Nyholm Nyholm commented Dec 5, 2020
Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations?
Tickets
License MIT
Doc PR

This will fix #39328 in a better way.

A VariableNode may have an array as value and also a default value as "null". (Like the workflow component).
When we dump the config, we generate invalid yaml:

    workflows:
        enabled:              false
        workflows:
            # Prototype
            name:
                # Select which Transition events should be dispatched for this Workflow
                events_to_dispatch:   null

                    # Examples:
                    - workflow.enter
                    - workflow.transition

With this PR, we will remove the null default value from the dumped config.

#SymfonyHackday

@fabpot
Copy link
Member
fabpot commented Dec 5, 2020

Thank you @Nyholm.

fabpot added a commit that referenced this pull request Dec 5, 2020
…r VariableNode with array example (Nyholm)

This PR was merged into the 4.4 branch.

Discussion
----------

[Config] YamlReferenceDumper: No default value required for VariableNode with array example

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? |
| Ti
8000
ckets       |
| License       | MIT
| Doc PR        |

This will fix #39328 in a better way.

A `VariableNode` may have an array as value and also a default value as "null". (Like the workflow component).
When we dump the config, we generate invalid yaml:

```
    workflows:
        enabled:              false
        workflows:
            # Prototype
            name:
                # Select which Transition events should be dispatched for this Workflow
                events_to_dispatch:   null

                    # Examples:
                    - workflow.enter
                    - workflow.transition

```

With this PR, we will remove the `null` default value from the dumped config.

#SymfonyHackday

Commits
-------

9104fd4 [Config] YamlReferenceDumper: No default value required for VariableNode with array example
@Nyholm
Copy link
Member Author
Nyholm commented Dec 5, 2020

OOps, I just pushed CS fixes.

Thank you for the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0