Skip to content

[HttpFoundation] added a way to override the Request class #8957

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
Oct 1, 2013

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Sep 7, 2013

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #7461, #7453
License MIT
Doc PR symfony/symfony-docs#3021

This is an alternative implementation for #7461.

I've also reverted #7381 and #7390 as these changes are not needed anymore.

Todo:

  • add some tests

public static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
{
if (self::$requestFactory) {
return call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a check that the returned class is an instance of \Symfony\Component\HttpFoundation\Request ?

@stof
Copy link
Member

stof commented Sep 9, 2013

A PR to the doc should be created too, to document how this can be used

@fabpot
Copy link
Member Author

fabpot commented Sep 9, 2013

Before updating the docs, we first need to decide which way we want to go.

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

Successfully merging this pull request may close these issues.

3 participants