Closed
Description
Symfony version(s) affected: 4.1.7
Description
We have the next route:
$path = '/{siteSection}/{categoryPath}/';
$defaults = [
'_controller' => 'SiteBundle\Controller\Category:index',
);
$requirements = array(
'siteSection' => 'catalog',
'categoryPath' => '([\d\w-]+\/*?){2,4}'
];
$routes = new RouteCollection();
$route = new Route($path, $defaults, $requirements);
// add the new route to the route collection
$routeName = 'catalog.category_controller';
$routes->add($routeName, $route);
$router = new Router(OneOfLoaders, 'routing.yml');
$routeInfo = $this->router->match('/catalog/large_and_small_appliances/large_appliances/');
For example, we have the next URI:
- /catalog/large_and_small_appliances/large_appliances/
- /catalog/large_and_small_appliances/
On Symfony 4.0 there was no issues with these URI. They' re worked as expected. When i updated symfony on 4.1, i got issues with them. The first URI in browser gives me an error: ResourceNotFoundException
The second one is OK.
Command: php bin/console router:match --host=my_host /catalog/large_and_small_appliances/ --scheme=https
shows the route catalog.category_controller(as expected). Any ideas, what's wrong?
Additional context
They're both ok on Symfony 4.0