jorge07 / symfony-6-es-cqrs-boilerplate

Symfony 6 DDD ES CQRS backend boilerplate.
MIT License
1.07k stars 187 forks source link

use config to convert exception to status codes #156

Closed jon-ht closed 4 years ago

jon-ht commented 4 years ago

Inspired from https://api-platform.com/docs/core/errors/#converting-php-exceptions-to-http-errors.

I think this way it's easier to override status code rather than adding another if statement in ExceptionSubscriber

P.S. I've also fixed unit test for JsonBodyParserSubscriberTest.php because it throws a depreciation exception causing failed tests

jorge07 commented 4 years ago

Thanks @jon-ht for this. Your first PR here is merged 👍