You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Duplicate keys are not valid by definition in YAML. The current implementation contains a bug that allows a key to be defined multiple times when the value is not set.
How to reproduce
services:
Foo:
Bar:
Foo:
is invalid YAML but the YAML parser is fine with this.
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
…avmic)
This PR was squashed before being merged into the 7.2 branch.
Discussion
----------
[Yaml] Throw on duplicate key even when value is NULL
| Q | A
| ------------- | ---
| Branch? | 5.4 (since v3.0)
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Issues | Fix#57262
| License | MIT
Duplicate keys are not valid by definition in YAML. The current implementation contains a bug that allows a key to be defined multiple times when the value is not set.
```yaml
services:
Foo:
Bar:
Foo:
```
Extends symfony/yaml@8094454
to throw when a key is set twice in YAML without a value.
It may be technically a breaking change (as it suddenly makes some yaml-like files invalid), even though I'd classify it as a bugfix (as by definition, such files were not valid).
If we classify it as a bug, we should probably backport the fix to the oldest maintained version.
Commits
-------
f9df19b [Yaml] Throw on duplicate key even when value is NULL
Symfony version(s) affected
7+, 6+, 5+
Description
Duplicate keys are not valid by definition in YAML. The current implementation contains a bug that allows a key to be defined multiple times when the value is not set.
How to reproduce
is invalid YAML but the YAML parser is fine with this.
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: