FastRoute 0.6.0
Added support for trailing optional segments, for example the route
$r->addRoute('GET', '/foo[/{bar}[/{baz}]]', 'handler');
is equivalent to the three routes
$r->addRoute('GET', '/foo', 'handler');
$r->addRoute('GET', '/foo/{bar}', 'handler');
$r->addRoute('GET', '/foo/{bar}/{baz}', 'handler');
As a result of this additional the output format for RouteParser
was changed to add another array level, which may need to be accounted for if you use a custom parser.