fabpot/Silex — Issue #189: Multiple mounts with similar subroutes fails
Author: romainneutron
Created: 2011-10-19 13:50:48+00:00
State: open

Hello, when I mount multiple sub-apps , each declaring some similar subroutes, only the last mounted app works for the similar route.

For example :

get('/info/', function (Application $app)
{
return new Response('Hello world, I am app1 on route /');
});

return $controllers;
}
}

class Controller2 implements ControllerProviderInterface
{
public function connect(Application $app)
{
$controllers = new ControllerCollection();

$controllers->get('/info/', function (Application $app)
{
return new Response('Hello world, I am app2 on route /');
});

return $controllers;
}
}

$app = new Application();
$app->mount('/app1', new Controller1());
$app->mount('/app2', new Controller2());
$app->run();

The route /app1/info/ will fail, while /app2/info/ success.

This bug is happening with the latest Silex source (today)