8000 [HttpFoundation] Refactor the Request / Response classes to use the standard interfaces from php-fig · Issue #17392 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
< 8000 /div>

[HttpFoundation] Refactor the Request / Response classes to use the standard interfaces from php-fig #17392

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

Closed
GuilhemN opened this issue Jan 15, 2016 · 3 comments

Comments

@GuilhemN
Copy link
Contributor

As discussed here, it may be the time to think about refactoring the Request and the Response classes to follow the php-fig standards.

You can see this interfaces here.

Message from @iltar:

Actually, I've been thinking of converting the current Request/Response objects to builders. Parameter converters etc are all working by setting values and the same goes for response listeners. By converting the ResponseBuilder and RequestBuilder into a "frozen" variant, it can also be compliant with PSR. This means that when modifying the request > builder but your action > PSR request. Same goes for the response, you can return a Response(Builder), which gets converted to a PSR Response if not already.

@Tobion
Copy link
Contributor
Tobion commented Jan 15, 2016

Duplicate of #15414. And this has been discussed alot already. PSR-7 is immutable whereas symfonys Request/Response isn't.

@stof
Copy link
Member
stof commented Jan 15, 2016

This is impossible without creating a new incompatible framework (even though you keep the name, which only makes things harder).
Just look at closed issues talking about PSR-7 and at the Symfony blog (even though some of the discussion also happened privately in the core team, I think we posted our conclusions publicly).

this is why we have a PSR-7 bridge allowing to convert between PSR-7 and HttpFoundation instead.

@GuilhemN
Copy link
Contributor Author

@Tobion @stof right sorry I didn't see this issues...

To be closed then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0