Skip to content

Commit f1f0c0e

Browse files
committed
[HttpFoundation] Deprecated ApacheRequest
1 parent b40f6b5 commit f1f0c0e

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

UPGRADE-4.4.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ DependencyInjection
2626
services:
2727
App\Handler:
2828
tags: ['app.handler']
29-
29+
3030
App\HandlerCollection:
3131
arguments: [!tagged app.handler]
3232
```
@@ -36,7 +36,7 @@ DependencyInjection
3636
services:
3737
App\Handler:
3838
tags: ['app.handler']
39-
39+
4040
App\HandlerCollection:
4141
arguments: [!tagged_iterator app.handler]
4242
```
@@ -60,6 +60,11 @@ HttpClient
6060

6161
* Added method `cancel()` to `ResponseInterface`
6262

63+
HttpFoundation
64+
--------------
65+
66+
* `ApacheRequest` is deprecated, use `Request` class instead.
67+
6368
HttpKernel
6469
----------
6570

@@ -84,11 +89,11 @@ Security
8489
TwigBridge
8590
----------
8691

87-
* Deprecated to pass `$rootDir` and `$fileLinkFormatter` as 5th and 6th argument respectively to the
92+
* Deprecated to pass `$rootDir` and `$fileLinkFormatter` as 5th and 6th argument respectively to the
8893
`DebugCommand::__construct()` method, swap the variables position.
8994

9095
Validator
9196
---------
9297

93-
* Deprecated passing an `ExpressionLanguage` instance as the second argument of `ExpressionValidator::__construct()`.
98+
* Deprecated passing an `ExpressionLanguage` instance as the second argument of `ExpressionValidator::__construct()`.
9499
Pass it as the first argument instead.

UPGRADE-5.0.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ DependencyInjection
101101
services:
102102
App\Handler:
103103
tags: ['app.handler']
104-
104+
105105
App\HandlerCollection:
106106
arguments: [!tagged_iterator app.handler]
107107
```
@@ -114,7 +114,6 @@ DoctrineBridge
114114
* Passing an `IdReader` to the `DoctrineChoiceLoader` when the query cannot be optimized with single id field will throw an exception, pass `null` instead
115115
* Not passing an `IdReader` to the `DoctrineChoiceLoader` when the query can be optimized with single id field will not apply any optimization
116116

117-
118117
DomCrawler
119118
----------
120119

@@ -268,6 +267,7 @@ HttpFoundation
268267
use `Symfony\Component\Mime\FileBinaryMimeTypeGuesser` instead.
269268
* The `FileinfoMimeTypeGuesser` class has been removed,
270269
use `Symfony\Component\Mime\FileinfoMimeTypeGuesser` instead.
270+
* `ApacheRequest` is has been removed, use the `Request` class instead.
271271

272272
HttpKernel
273273
----------
@@ -442,12 +442,12 @@ TwigBundle
442442
* The default value (`false`) of the `twig.strict_variables` configuration option has been changed to `%kernel.debug%`.
443443
* The `transchoice` tag and filter have been removed, use the `trans` ones instead with a `%count%` parameter.
444444
* Removed support for legacy templates directories `src/Resources/views/` and `src/Resources/<BundleName>/views/`, use `templates/` and `templates/bundles/<BundleName>/` instead.
445-
445+
446446
TwigBridge
447447
----------
448448

449449
* Removed argument `$rootDir` from the `DebugCommand::__construct()` method and the 5th argument must be an instance of `FileLinkFormatter`
450-
* removed the `$requestStack` and `$requestContext` arguments of the
450+
* removed the `$requestStack` and `$requestContext` arguments of the
451451
`HttpFoundationExtension`, pass a `Symfony\Component\HttpFoundation\UrlHelper`
452452
instance as the only argument instead
453453

@@ -517,7 +517,6 @@ Workflow
517517
property: state
518518
```
519519

520-
521520
* Support for using a workflow with a single state marking is dropped. Use a state machine instead.
522521

523522
Before:

src/Symfony/Component/HttpFoundation/ApacheRequest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@
1111

1212
namespace Symfony\Component\HttpFoundation;
1313

14+
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "%s" instead.', ApacheRequest::class, Request::class), E_USER_DEPRECATED);
15+
1416
/**
1517
* Request represents an HTTP request from an Apache server.
1618
*
19+
* @deprecated since Symfony 4.4. Use the Request class instead.
20+
*
1721
* @author Fabien Potencier <fabien@symfony.com>
1822
*/
1923
class ApacheRequest extends Request

src/Symfony/Component/HttpFoundation/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
-----
66

77
* passing arguments to `Request::isMethodSafe()` is deprecated.
8+
* `ApacheRequest` is deprecated, use the `Request` class instead.
89

910
4.3.0
1011
-----

src/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\HttpFoundation\ApacheRequest;
1616

17+
/** @group legacy */
1718
class ApacheRequestTest extends TestCase
1819
{
1920
/**

0 commit comments

Comments
 (0)