Closed
Description
Symfony version(s) affected: 4.1.0
Description
I'm having problem with router after 4.1 update on one of my routes I'm getting: Uncaught PHP Exception ErrorException: "Warning: preg_match(): Compilation failed: unmatched parentheses at offset 595" at /var/www/symfony/var/cache/dev/srcDevDebugProjectContainerUrlMatcher.php line 415
This looks like there is something wrong with generated regex.
Additional context
Here is generated regex
https://pastebin.com/egUBavqi
Routes in switch that matches url
849 => array(array('_route' => 'nsp_admin_package_createaction__invoke', '_format' => 'json', '_controller' => 'NSP\\Controller\\Admin\\Package\\CreateAction'), array('_format'), array('POST' => 0), null),
978 => array(array('_route' => 'nsp_admin_package_listaction__invoke', '_format' => 'json', '_controller' => 'NSP\\Controller\\Admin\\Package\\ListAction'), array('_format'), array('GET' => 0), null),
I'm calling: GET /admin/api/package.json