Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Detection of invalid route names (and perhaps even missing/invalid params) #359

Open
@Seldaek

Description

Just a feature idea:

UrlGeneratorInterface::generate as well as proxy methods in the base controller could check if the given route name is part of the defined routes in the application.

When refactoring routes it happens once in a while something gets missed and it occurred to me that PHPStan probably could have saved my ass. If the route is not commonly used it can otherwise go missed for a while until it fails at runtime.

One could even push this further to check param types by looking at the route pattern and what types the linked action require I guess.

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

        AltStyle によって変換されたページ (->オリジナル) /