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

Appearance settings

Behavior Change: Incorrect controller arguments no longer throw exception #20746

Copy link
Copy link
Closed
@weaverryan

Description

@weaverryan
Issue body actions

Hi guys!

The commit sha: 9c48756 (cc @iltar) changed some behavior in all versions of Symfony, I think on accident.

Consider the following:

/**
 * @Route("/product/{id}")
 */
public function showAction($id2)
{
}

Previously, this would have thrown the following error:

Controller "SomeController::showAction" requires that you provide a value for the "$id2" argument (because there is no default value or because there is a non optional argument after this one).

But after this commit, it does not throw the error, and instead $id2 is set to null in all cases. The specific problem is this block: 9c48756#diff-8518ab757bc9acd6d5a874a2e2737502R135

Was this expected? It's a step back in DX, as you can now silently mess up your route param without being notified.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.