title: Silex 2 - How to mouth dynamic routes ? As in version 1 of Silex
body: <p>I have a project that use Silex 1.2 in addition to updating to version 2. But mounting routes dynamically in a controller no longer works. My new routes are not saved.</p>
  
  <pre><code>// routing.php
  $app-&gt;get('/', 'App\\Controllers\\App::main')-&gt;bind('app_main');
  
  // App.php
  class App {
      function main(Application $app, Request $request) {
          $name = 'basic';
          $version = 1;
  
          $moduleClass = 'App\Core\Modules\\'.$name.'\v'.$version.'\\ControllerProvider';
          $app-&gt;mount($request-&gt;getPathInfo(), new $moduleClass($name, $version));
  
          $subRequest = Request::create(
              $app['url_generator']-&gt;generate('basic_1'),
              'POST'
          );
  
          return $app-&gt;handle($subRequest, HttpKernelInterface::SUB_REQUEST, false);
      }
  }
  </code></pre>
  
  <p>And my application can not find the new route, this code work with Silex 1.2... I can not find what has changed in version 2.</p>