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

Skip to content

@ParamConverter not found fails phpunit test with symfony/skeleton #33989

Closed
@LaurentMarquet

Description

@LaurentMarquet

Symfony version(s) affected: 4.3

Description
Not finding an Entity via @ParamConverter makes the phpunit test fail if project is created with symfony/skeleton.

How to reproduce
I have built 2 projects ParamConverterPass and ParamConverterFail to help reproduce the problem.

The problem is that if we use @ParamConverter to get a non-existing entity, with Doctrine, using data in url, it will make the phpunit test fail if the project is built with symfony/skeleton.

Even if both projects return 404, the one built with symfony/skeletonis not catched by phpunit and return "Sorry, the page you are looking for could not be found." while the one built with symfony/website-skeleton return "App\Entity\Player object not found by the @ParamConverter annotation."

Possible Solution
Haven't got time to investigate yet

Additional context

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