Skip to content

Make failed entity argument resolving display a usefull error message #60111

Closed
@nicolas-grekas

Description

@nicolas-grekas

Description

Current, using the default recipe coming with Symfony 7.2, when one has a controller like that:

    #[Route('/conference/{slug}', name: 'conference')]
    public function show(Conference $conference) {

One will get this message:

Image

When you know the solution, the fix is trivial:

-    #[Route('/conference/{slug}', name: 'conference')]
+    #[Route('/conference/{slug:conference}', name: 'conference')]

But when you don't, you're SOL.

The thing is, we do have the reporting infrastructure to improve this: NearMissValueResolverException as introduced in #54107.
It'd be great to leverage it for similar cases.

Help wanted.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help wantedIssues and PRs which are looking for volunteers to complete them.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy