-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
@ParamConverter not found fails phpunit test with symfony/skeleton #33989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is probably related to the fact that before Symfony 4.4 (where the ErrorRenderer component is introduced precisely to solve that), the handling of error pages is implemented by TwigBundle, and |
Yes, but my "main" problem is that the phpunit test fails, even if 404 is launched. |
Should this not be fixed since this PR? |
It seems not. |
Yes it works with Twig, but the test still return the error between the tests:
Time: 226 ms, Memory: 16.00 MB But let's close this issue as it's solved in 4.4 |
You can get rid of the log output by adding a "real logger" like monolog. You can simply install |
Yep it disappeared :) by using too much |
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/skeleton
is not catched by phpunit and return "Sorry, the page you are looking for could not be found." while the one built withsymfony/website-skeleton
return "App\Entity\Player object not found by the @ParamConverter annotation."Possible Solution
Haven't got time to investigate yet
Additional context
The text was updated successfully, but these errors were encountered: