-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Method "DELETE" seems not to be seen by Symfony #48658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you enable |
Aïe... so simple. No I did not. Thanks for your quick help ! I've also updated the recipes, and this has certainly been modified then. |
I forgot to ask : maybe the documentation could be added about this configuration. I wen't many times through the documentation there : https://symfony.com/doc/current/routing.html#matching-http-methods and it is not mentionned. |
Indeed it feels like it would be better! Are you up for a PR on https://github.com/symfony/symfony-docs? |
I never done that. So here's a try : symfony/symfony-docs#17565 |
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- Update routing.rst Add a note about allowing the http_method_override in the framework.yml file symfony/symfony#48658 Commits ------- 576df85 Update routing.rst
Symfony version(s) affected
6.2.1
Description
I bumped my application from PHP 7.4 to 8.1, and from Symfony 5.4 to 6.2.
Before that, using the "delete" method was ok. I mean, in my controller, I limit a route to "DELETE" method, and then in my HTML form, I add the "".
My code didn't change except I went from using annotations to PHP properties on the route. But the HTML form did not change.
But now Symfony give me the error :
No route found for "POST http://192.168.0.146:8090/intervenants/601": Method Not Allowed (Allow: GET, DELETE)
If i understand well, the route with the delete method is well seen. In the request, the field "_method" with value "delete" can be seen. So I don't understand why it doesn't work anymore. I've looked through the changelog of 6.0, 6.1 and 6.2, but didn't find anything about that.
How to reproduce
Here's the code in the controller :
And here's the HTML form :
Possible Solution
No response
Additional Context
The text was updated successfully, but these errors were encountered: