This repository has been archived by the owner on Jul 4, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have
Controller::generateRouteName()
always put the method first.
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.
- Loading branch information