Skip to content


Subversion checkout URL

You can clone with
Download ZIP
[READ-ONLY] Subtree split of the Symfony HttpFoundation Component -- clone into Symfony/Component/ (master at symfony/symfony)
Latest commit 1563f78 @nicolas-grekas nicolas-grekas feature #16629 [HttpFoundation] Remove deprecated class method parame…
…ter (belka-ew)

This PR was merged into the 3.0-dev branch.


[HttpFoundation] Remove deprecated class method parameter

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

$deep argument in Symfony\Component\HttpFoundation\BagParameter::get was deprecated  in 2.8 and removed in master, but it is still used in the code of the class (and in the filter() method)


4ffe14c [HttpFoundation] Remove deprecated class method parameter
Failed to load latest commit information.
File Merge branch '2.3' into 2.7
Session [HttpFoundation] Remove not existing class member
Tests Merge branch '2.8'
.gitignore Added missing files .gitignore
AcceptHeader.php [2.3] CS And DocBlock Fixes
AcceptHeaderItem.php fixed types in phpdocs
ApacheRequest.php [HttpFoundation] do not use server variable PATH_INFO because it is a…
BinaryFileResponse.php fixes CS [HttpFoundation] change precedence of parameters in Request::get
Cookie.php remove api tags from code
ExpressionRequestMatcher.php [HttpFoundation] added ExpressionRequestMatcher
FileBag.php remove api tags from code
HeaderBag.php Merge branch '2.3' into 2.7
IpUtils.php [HttpFoundation] Fixes /0 subnet handling in IpUtils
JsonResponse.php Remove code for PHP <5.5.9
LICENSE Updated copyright to 2015
ParameterBag.php [HttpFoundation] Remove deprecated class method parameter Rely on iconv and symfony/polyfill-*
RedirectResponse.php remove api tags from code
Request.php Merge branch '2.8'
RequestMatcher.php Merge branch '2.3' into 2.7
RequestMatcherInterface.php remove api tags from code
RequestStack.php unified return null usages
Response.php Merge branch '2.8'
ResponseHeaderBag.php Merge branch '2.3' into 2.7
ServerBag.php Handled bearer authorization header in REDIRECT_ form
StreamedResponse.php Add more callable type hints
composer.json Merge branch '2.8'
phpunit.xml.dist Add missing exclusions from phpunit.xml.dist

HttpFoundation Component

HttpFoundation defines an object-oriented layer for the HTTP specification.

It provides an abstraction for requests, responses, uploaded files, cookies, sessions, ...

In this example, we get a Request object from the current PHP global variables:

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

$request = Request::createFromGlobals();
echo $request->getPathInfo();

You can also create a Request directly -- that's interesting for unit testing:

$request = Request::create('/?foo=bar', 'GET');
echo $request->getPathInfo();

And here is how to create and send a Response:

$response = new Response('Not Found', 404, array('Content-Type' => 'text/plain'));

The Request and the Response classes have many other methods that implement the HTTP specification.


You can run the unit tests with the following command:

$ cd path/to/Symfony/Component/HttpFoundation/
$ composer install
$ phpunit
Something went wrong with that request. Please try again.