This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Description
I want to match a different controller action for each HTTP method on a single URI.
The nicest way to do this might be:
App\Document\Page:
uri_schema: /{title}
definitions:
view:
methods: [GET]
defaults:
_controller: App:Page:view
edit:
methods: [PATCH]
defaults:
_controller: App:Page:edit
token_poviders:
title: [content_method, {method: getTitle}]
As the uri_schema key is validated by the YmlFileLoader but not handled as a mapping key, I tried this:
App\Document\Page:
definitions:
view:
uri_schema: /{title}
methods: [GET]
defaults:
_controller: App:Page:view
edit:
uri_schema: /{title}
methods: [PATCH]
defaults:
_controller: App:Page:edit
token_poviders:
title: [content_method, {method: getTitle}]
But the methods key is not handled.
What's the good way to add HTTP method requirements like with the standard Symfony router ?