minor #1159 Have `Controller::generateRouteName()` always put the method first. (LawnGnome)
This PR was merged into the 1.3 branch. Discussion ---------- Have `Controller::generateRouteName()` always put the method first. (As requested, this is #1154 rebased against 1.3.) At present, mounted controllers can get weird route names. For instance, let's say you have this controller definition: $otherController = $app['controllers_factory']; $otherController->get('/{name}', function (Request $request, $name) use ($app) { return new Response("Goodbye $name!\n", 200, ['Content-Type' => 'text/plain']); }); $app->mount('/goodbye', $otherController); The generated route name in this case will be `_goodbyeGET_name`, which technically contains everything, but is ugly. With this PR, the route name will change to `GET_goodbye_name`, which is considerably easier to parse when debugging. Commits ------- f8d6484c Have `Controller::generateRouteName()` always put the method first.
Showing
Please register or sign in to comment