Route debugging in Symfony2

I'm having trouble figuring out what's wrong with a single route in my Symfony2 YML routing file. Each other route works very well (and I already have a couple dozen), but this route is not recognized.

Here is the corresponding clip of my YML file:

ProjectMainBundle_util_initUpload:
    pattern:  /util/initUpload
    defaults: { _controller: ProjectMainBundle:Utilities:initUpload }
    requirements:
        _method:  POST

ProjectMainBundle_util_init:
    pattern:  /util/init
    defaults: { _controller: ProjectMainBundle:Utilities:initUtilities }
    requirements:
        _method:  POST

ProjectMainBundle_util_download:
    pattern:  /util/download
    defaults: { _controller: ProjectMainBundle:Utilities:download }
    requirements:
        _method:  GET

The first route, '/ util / initUpload', returns' No route was found for the error 'POST / util / initUpload' . I tried to place the block in different places (even moving it above "/ util / init".) The index route "/" is at the end of my routing.yml document, so this should not be a problem. The above routes are the only ones in the format / util / *.

, , . POST , . CamelCase . , ...

? ? - YML php-, .

+5
1

:

Symfony 2.x -

app/console router:debug

Symfony 3.x -

bin/console debug:router

, . , - .

YAML/PHP.

+20

All Articles