Closed mmuruev closed 9 years ago
At this point the routes have already been "flushed" i think instead you could do it in a boot method in a service provider.
But not chance to update routes? If it so early event why not?
https://github.com/silexphp/Silex/blob/master/src/Silex/Application.php#L519 you can see it calls flush at that point, that is before the handle method i called, that means its before any events gets notified.
Acctualy I've found that Silex routes perfectly work, for me.. only issue was in REST provider. But all requiest without additional provider work. Seems like this is an external lib issue. And without it you can easy update your routes without tricky things.
Seems that code like this
$app->before(function($request) use ($app){ $app->mount('/dynamic', new DynamicLoadController()); }, \Silex\Application::EARLY_EVENT); Have no effect on router. But by doc this code should run before security and route. Is this a bug?