I'm trying to set the "segment_separators" option in my route
definition, but the XML parser doesn't accept arrays.

Using YAML works fine:

gitwiki.page.view:
    pattern: /{name}
    defaults: { _controller: gitwiki.controller.page:viewAction }
    options: { segment_separators: [/] }


Using XML, I can't find the correct format:
    <route id="gitwiki.page.view" pattern="/{name}">
        <default key="_controller">gitwiki.controller.page:viewAction</
default>
        <option key="segment_separators">/</option>
    </route>

This option is an array, but the XML parser accepts only strings.
$options[(string) $node->getAttribute('key')] = trim((string) $node-
>nodeValue);
https://github.com/symfony/symfony/blob/83c6d337e2fa0b309e8a856624fab97d077a6d81/src/Symfony/Components/Routing/Loader/XmlFileLoader.php#L88

I get the following error:
Warning: array_map() [function.array-map]: Argument #2 should be an
array in /symfony-sandbox/src/vendor/symfony/src/Symfony/Component/
Routing/RouteCompiler.php on line 230

I think XML Parser should have generic format for array values. (like
XMLRPC arrays ? http://www.xmlrpc.com/spec)

Jérôme

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to