Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console][Routing] router:debug should warn about $ #8331

Closed
@ofbeaton

Description

@ofbeaton

This would just be a nice to have (feature request), but router:debug could warn you if you put a $ in your route parameter. IE

myroute:
  patern: /post/{$id}

Running

php app/console router:debug

or

php app/console router:debug myroute

Could give the user a warning that the parameter likely does not need the $...

Which leads me to route debugging feature number 2, would be to check to see if the method mentioned in defaults exists, then checks to see if the parameters match. Getting a warning like 'route method does not exist on controller' or 'route parameters do not match existing method on controller' would be rad.

When running in app_dev you could also do this if the route is not found.

Opinions?

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