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

Confusing exception when using action injection + casing mismatch in routing file #28254

Copy link
Copy link
Closed
@ostrolucky

Description

@ostrolucky
Issue body actions

Having such action:

public function index(Request $request, PostRepository $posts): Response

and such routing:

index:
    path: /en/blog
    controller: App\Controller\BlogController::Index

yields

Controller "App\Controller\BlogController::Index()" requires that you provide a value for the "$posts" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.

This is because user made a typo in routing and used BlogController::Index, instead of BlogController::index

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.