Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb009902

Browse files
committed
minor#13280 [HttpKernel] deprecated ContainerAwareHttpKernel (fabpot)
This PR was merged into the 2.7 branch.Discussion----------[HttpKernel] deprecated ContainerAwareHttpKernel| Q | A| ------------- | ---| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aIn Symfony 3.0, the `request` scope will be removed as the `request` is not a service anymore. So, the `ContainerAwareHttpKernel` should be deprecated now as it won't be needed anymore in 3.0. I've moved the only line of code that is still relevant in `HttpKernel` directly.Note that I did not trigger a deprecation notice as the class is still used in Symfony 2.7.Commits-------0c50301 [HttpKernel] deprecated ContainerAwareHttpKernel
2 parentsf3b72e4 +0c50301 commitb009902

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
*
2626
* @author Fabien Potencier <fabien@symfony.com>
2727
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
28+
*
29+
* @deprecated since version 2.7, to be removed in 3.0.
2830
*/
2931
class ContainerAwareHttpKernelextends HttpKernel
3032
{
@@ -55,8 +57,6 @@ public function __construct(EventDispatcherInterface $dispatcher, ContainerInter
5557
*/
5658
publicfunctionhandle(Request$request,$type = HttpKernelInterface::MASTER_REQUEST,$catch =true)
5759
{
58-
$request->headers->set('X-Php-Ob-Level',ob_get_level());
59-
6060
$this->container->enterScope('request');
6161
$this->container->set('request',$request,'request');
6262

‎src/Symfony/Component/HttpKernel/HttpKernel.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public function __construct(EventDispatcherInterface $dispatcher, ControllerReso
6262
*/
6363
publicfunctionhandle(Request$request,$type = HttpKernelInterface::MASTER_REQUEST,$catch =true)
6464
{
65+
$request->headers->set('X-Php-Ob-Level',ob_get_level());
66+
6567
try {
6668
return$this->handleRaw($request,$type);
6769
}catch (\Exception$e) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp