You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now it is impossible to override Request class as it is instantiated in few places.
To permit this override, we need to know on which class to call ::create() method.
This has already been done for sub-request in #7381 and #7390 (the sub requests use the same class as the master request).
…ss (fabpot)
This PR was merged into the master branch.
Discussion
----------
[HttpFoundation] added a way to override the Request class
| 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
Commits
-------
464439d [HttpFoundation] added a way to override the Request class
For now it is impossible to override
Request
class as it is instantiated in few places.To permit this override, we need to know on which class to call
::create()
method.This has already been done for sub-request in #7381 and #7390 (the sub requests use the same class as the master request).
This should now be done in following places:
HttpKernel\Client::filterRequest()
method (https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Client.php#L109)HttpKernel\HttpCache\Esi::handle()
method (https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpCache/Esi.php#L197)HttpKernel\HttpCache\Store::purge()
method (https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpCache/Store.php#L315)What is the best way to let these classes know on which class they should call the
::create()
method?The text was updated successfully, but these errors were encountered: