Fast Route v0.6.0 Release Notes

Release Date: 2015-06-24 // almost 9 years ago
  • ➕ 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.