Skip to content

Instantly share code, notes, and snippets.

@wouterj
Last active July 27, 2021 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wouterj/8247679 to your computer and use it in GitHub Desktop.
Save wouterj/8247679 to your computer and use it in GitHub Desktop.
<?php
$root
->fixXmlConfig('path')
->children()
->arrayNode('paths')
->beforeNormalization()
->ifString()
->then(function ($v) {
return array($v);
})
->end()
->prototype('scalar')->end()
->end()
->end()
;
# posibilities
paths: ['foo/bar', 'bar/foo']
paths: 'foo/bar'
path: 'foo/bar'
<path>foo/bar</path>
<path>bar/foo</path>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment