I have found one possible way in the meantime to flush the controllers to create the RouteCollection and retrieve it via binding name.
You will receive a Route instance and can use there the normal middleware listener methods like before
, after
and so on.
$app->flush();
$route = $app['routes']->get('control.start');
$route->before(function(Symfony\Component\HttpFoundation\Request $request) use ($app) {
throw new RuntimeException('You should see me.');
});