You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php// Setup server$server = newHttpServer(newConfiguration('0.0.0.0', 8080));
// Setup application and routes$application = newHttpApplication();
$application->put('/user/{id}', function (ServerRequestInterface$request) : ResponseInterface {
returnResponse::asText("updated");
});
$application->delete('/user/{id}', function (ServerRequestInterface$request) : ResponseInterface {
returnResponse::asText("destroyed");
});
// Run the server, it should listen on localhost:8080$application->run($server);
Two routes contains same name and latest route (with delete method) is overwrite the previous. This leads to the following error:
This uri `/user/5` allows only DELETE http methods.
It's a bug.
The text was updated successfully, but these errors were encountered:
Note: Seems like the problem is within the route naming, the routes get overridden because I am reusing the same name to register the route. I will need to tweak it a bit with help of currently used symfony router
How to reproduce?
Two routes contains same name and latest route (with delete method) is overwrite the previous. This leads to the following error:
It's a bug.
The text was updated successfully, but these errors were encountered: