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

Skip to content

[ParamConverter] Unable to guess how to get a Doctrine instance from the request information  #21563

Closed
@Belgacem-TLILI

Description

@Belgacem-TLILI
Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC?
Symfony version 3.2.3

This happen after the last update from Symfony 3.2.2 to 3.2.3
In my action i have multiple routes like below

 /**
     * @Route("/my-route", name="first_route", defaults={"type" = null})
     * @Route("/my-route/report/{objectId}/{startDate}/{endDate}", name="second_route", defaults={"type" = null})
     * @Route("/my-route/{objectId}/{startDate}/{endDate}/{type}", name="third_route", defaults={"type" = null})
     * @ParamConverter(name="object", Class="MyBundle:MyObjectClass")
     */
    public function indexAction(Request $request, $object = null, $startDate = null, $endDate = null, $type)
    {
// Logic
}

if i try to access to the page with the route /my-route i get the below exception

screen shot 2017-02-08 at 10 11 18 am

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