Skip to content
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

Add other Response types as ResponseFactory methods #55

Closed
garrettw opened this issue Oct 8, 2020 · 1 comment
Closed

Add other Response types as ResponseFactory methods #55

garrettw opened this issue Oct 8, 2020 · 1 comment
Labels
Won't Fix This will not be worked on

Comments

@garrettw
Copy link

garrettw commented Oct 8, 2020

Feature Request

Q A
New Feature yes
RFC ?
BC Break no

Summary

I would like to be able to use ResponseFactory to create instances of the various *Response classes.

@weierophinney weierophinney added the Won't Fix This will not be worked on label Oct 8, 2020
@weierophinney
Copy link
Member

Marking as "won't fix".

The reason is because the various factories in Diactoros specifically target PSR-17 (HTTP message factories). Adding specialized factories to these defeats the purpose of the factories, which is to provide a standards-compliant way to produce instances without needing to rely on a specific implementation. If we have custom methods for our own purposes, then the factories are no longer mix-and-match with other PSR-17 and/or PSR-7 implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Won't Fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants