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

Allow to specify Throwable as exception class #2263

Closed a-menshchikov closed 4 years ago

a-menshchikov commented 4 years ago

Currently we can't use Throwable in exception.codes because check method uses is_subclass_of. This PR fixes this issue.

xabbuh commented 4 years ago

Can you please add a test case to ensure that we don't break this accidentally in the future? And can you then please rebase and retarget on 2.x as I think this fix should be included in 2.8.x too?

a-menshchikov commented 4 years ago

@xabbuh done.

xabbuh commented 4 years ago

Thank you @a-menshchikov.