[4.x] Add method to customize the response factory class in the slim http psr17 factory#2713
[4.x] Add method to customize the response factory class in the slim http psr17 factory#2713adriansuter wants to merge 1 commit into
Conversation
|
How would we be able to set a custom http decorator? |
|
You'd need to create your own Then create your own |
|
Wouldn't it be nice, that if you use one of the built-in PSR-7 implementations, then you just have to set the custom http decorator response factory to the slim http psr17 factory? Then Slim does automatically decorate as before. |
|
How many decorator libraries are there for PSR-7 decoration besides Slim-Http? I don't know of any. |
|
Agree. So you think that this should not be an option? Either you use Slim-Http or you have to create your own response factory and server request creator. |
|
If we were to do it correctly, we'd need to create a decorator provider specifically for that purpose. Opening up the SlimHttp provider with that setter just seems like a hackish way to do it. So for now, unless users end up requesting that feature I don't think it's necessary. |
This PR addresses #2712.