Skip to content

[Cookbook][Routing] & [Book][Routing] update "_method" to "methods" #621

Open
@X13454

Description

@X13454

Hello,

Looking at English version of http://symfony.com/doc/master/book/routing.html#adding-http-method-requirements, (YAML tab) we have:

# app/config/routing.yml
contact:
    path:     /contact
    defaults: { _controller: AppBundle:Main:contact }
    methods:  [GET]

contact_process:
    path:     /contact
    defaults: { _controller: AppBundle:Main:processContact }
    methods:  [POST]

whereas in http://symfony.com/fr/doc/master/cookbook/routing/method_parameters.htm and http://symfony.com/fr/doc/master/book/routing.html#ajouter-des-conditions-requises-pour-la-methode-httpl, we have this semantic:

        _method:  GET
        _method:  PUT
       ...

It seems that the [methods] option was introduced in version 2.2 http://symfony.com/doc/2.2/book/routing.html#adding-http-method-requirements.

Should the http://symfony.com/fr/doc/master/cookbook/routing/method_parameters.html and http://symfony.com/fr/doc/master/book/routing.html#ajouter-des-conditions-requises-pour-la-methode-http be updated with the latest option, for consistency sake?

Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions