I want to parse a YAML configuration that looks like this:
pageRoles:
Report1: [abc, xyz, def]
Report2: [fgh, xxx, yyy, rrr]
I want the resulting configuration array to look like this:
'pageRoles':
'Report1':
[
'abc',
'xyz',
'def'
],
'Report2':
[
'fgh',
'xxx',
'yyy',
'rrr'
]
I have this at the moment:
->arrayNode( 'pageRoles' )
->prototype( 'array' )
->useAttributeAsKey( 'name' )
->prototype( 'array' )
->prototype( 'scalar' )->end()
->end()
->end() // array prototype
->end() // pageRoles
And am getting this error:
Invalid type for path "site.pageRoles.ActivityReport.0". Expected array, but got string
What am I missing?