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
Description
Messenger config options array merged wrong. Values inside specific environment config of options array are merged to common config with numbers as keys.
How to reproduce
Create messenger.yaml in config/packages/ with following contents:
That's happened because in ConfigTree options are defined as arrayNode and has a prototype('variable'). So for combining config together PrototypedArrayNode::mergeValues() would be called. And there is an issue. For those PrototypedArrayNode that have not $keyAttribute$rightSide values added without keys:
foreach ($rightSideas$k => $v) {
// prototype, and key is irrelevant, append the elementif (null === $this->keyAttribute) {
$leftSide[] = $v;
continue;
}
Possible soultion
So the solution is to add useAttributeAsKey inside ConfigTree for arrayNode('options'). PR will be submitted soon
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected: 4.4
Description
Messenger config
options
array merged wrong. Values inside specific environment config ofoptions
array are merged to common config with numbers as keys.How to reproduce
messenger.yaml
inconfig/packages/
with following contents:config/packages/test/
and add options there:Output for test-environment:
Additional context
That's happened because in ConfigTree options are defined as
arrayNode
and has aprototype('variable')
. So for combining config togetherPrototypedArrayNode::mergeValues()
would be called. And there is an issue. For thosePrototypedArrayNode
that have not$keyAttribute
$rightSide
values added without keys:Possible soultion
So the solution is to add
useAttributeAsKey
inside ConfigTree for arrayNode('options'). PR will be submitted soonThe text was updated successfully, but these errors were encountered: