Skip to content

Removed all occurences of $this->getRequest() #3330

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

Merged
merged 1 commit into from
Dec 26, 2013

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Dec 14, 2013

Q A
Doc fix? no
New docs? no
Applies to 2.3
Fixed tickets -

Hello.

The request is a data object, and so the request should not be
inside the container. That's why the request will be removed
from the container in Symfony 3.0

So it is better to let the HttpKernel injects the request when
the user want to use the request.

More over, it is faster. The HttpKernel will always check if the
request should be injected. So injecting the request is time constant.
However, retrieve the request from the container will execute more
calls.

The request is a data object, and so the request should not be
inside the container. That's why the request will be removed
from the container in Symfony 3.0

So it is better to let the HttpKernel injects the request when
the user want to use the request.

More over, it is faster. The HttpKernel will always check if the
request should be injected. So injecting the request is time constant.
However, retrieve the request from the container will execute more
calls.
@cordoval
Copy link
Contributor

👍

weaverryan added a commit that referenced this pull request Dec 26, 2013
Removed all occurences of $this->getRequest()
@weaverryan weaverryan merged commit 636d20b into symfony:2.3 Dec 26, 2013
@lyrixx lyrixx deleted the request-2.3 branch December 26, 2013 16:47
weaverryan added a commit that referenced this pull request Dec 26, 2013
@weaverryan
Copy link
Member

Great work Grégoire! And nice chatting with you at the conference - see you next year ;)

@lyrixx
Copy link
Member Author

lyrixx commented Dec 26, 2013

Thank you for your amazing work ;)

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.

3 participants