FriendsOfSymfony / FOSRestBundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony
http://symfony.com/doc/master/bundles/FOSRestBundle/index.html
MIT License
2.79k stars 704 forks source link

Add fos rest info in the symfony serialization context #2294

Closed goetas closed 2 years ago

goetas commented 3 years ago

Fixes https://github.com/FriendsOfSymfony/FOSRestBundle/issues/2292

using same approach as in https://github.com/symfony/messenger/blob/1cc72a00521c69219ba79b7b04757d5e7fface66/Transport/Serialization/Normalizer/FlattenExceptionNormalizer.php#L98

goetas commented 3 years ago

I do not really understand how the error controller should work... how is \FOS\RestBundle\ErrorRenderer\SerializerErrorRenderer triggered?

monteiro commented 3 years ago

@goetas maybe seeing the units tests: https://github.com/FriendsOfSymfony/FOSRestBundle/blob/8779ceebf715d1c60bd10286fce9d32ed03c484a/Tests/ErrorRenderer/SerializerErrorRendererTest.php can give a hint?

If you have xdebug, it's perfect sometimes to understand the flow of the code. You can call the API and catch it on phpstorm or some IDE with xdebug support.

erikas-tranauskas commented 2 years ago

Any news about this one? I have this problem with exception enabled, RabbitMQ queue doesn't understand the returned exception.

GuilhemN commented 2 years ago

@erikas-tranauskas currents maintainers of the bundle unfortunately do no longer have enough time to review PRs, and introduce new features.

The future of the bundle is currently discussed in https://github.com/FriendsOfSymfony/FOSRestBundle/issues/2336 and on Symfony's slack under #fosrestbundle.

goetas commented 2 years ago

This is green and ready to be reviewed