Closed kriswillis closed 5 years ago
Same here, this seems to have been introduced in ce741512474c654d703833d263d337da28e09fe1
protected function getDomainByRouteMatches($matches, $name)
{
$matches = array_filter($matches, function($match) {
return !empty($match);
});
$matches = array_flip(array_intersect_key($matches, array_flip($this->availableDomains)));
return isset($matches[$name]) ? $matches[$name] : null;
}
Here $name
is the full route name, but $matches
contains the part of the route name which matches the regex, not the entire route name.
For example, given the pattern ^foo_
and a route named foo_bar
, $matches
would contain only foo_
.
You can work around this regression by ensuring the pattern in your config specifically matches the entire route name rather than just part of it:
routes_to_expose:
- '^foo_.+'
Fixed using #350
Since updating from 2.2.2 to 2.3.0, regex defined in
fos_js_routing.routes_to_expose
withinconfig.yml
are no longer matching our routes.We're using the following patterns:
Symfony 3.4.22 JsRoutingBundle 2.3.0
Rolling back to 2.2.2 exposes the routes correctly again.