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

[DX][HttpFoundation] Add RequestInterface #13625

Closed
wants to merge 2 commits into from
Closed

[DX][HttpFoundation] Add RequestInterface #13625

wants to merge 2 commits into from

Conversation

amikheychik
Copy link

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets no
License MIT
Doc PR no

Currently few methods in the HttpFoundation component are using Request class in the type hints. It's very inconvenient for a developer if he want to use his own class for the HTTP request object without extending the Symfony's original class (in that case Response class, for example is not possible to use).

Added interface only exposes methods that are required for the code, that worked with the Request class to have all the information it had originally. (I've checked only usage inside HttpFoundation component)

@ghost
Copy link

ghost commented Feb 8, 2015

I wonder if this is worth doing now or waiting until PSR-7 is completed.

Some methods use Request class in type hints. It's inconvenient when a developer want to use his own class for request, without extending the original Symfony's one.
@aitboudad
Copy link
Contributor

#10389 (comment)

@Tobion
Copy link
Member

Tobion commented Feb 9, 2015

I think this can be closed. I don't think we are going to create interfaces of the request/response in the current state as it's not clean enough, see #6406
If there will be interfaces, it's more likely going in the direction of PSR-7.

@fabpot fabpot closed this Feb 9, 2015
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

Successfully merging this pull request may close these issues.

None yet

4 participants