Skip to content

Commit acb6700

Browse files
committed
Trigger a deprecation warning for the MASTER_REQUEST constant
1 parent 1650c93 commit acb6700

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\HttpKernel;
13+
14+
trigger_deprecation('symfony/http-kernel', '5.3', '"Symfony\Component\HttpKernel\HttpKernelInterface::MASTER_REQUEST" is deprecated, use MAIN_REQUEST instead.');
15+
16+
/**
17+
* @author Alexander M. Turek <me@derrabus.de>
18+
* @internal To be removed in 6.0
19+
*/
20+
final class DeprecatedConstants
21+
{
22+
public const MASTER_REQUEST = HttpKernelInterface::MAIN_REQUEST;
23+
24+
private function __construct()
25+
{
26+
}
27+
}

src/Symfony/Component/HttpKernel/HttpKernelInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface HttpKernelInterface
2727
/**
2828
* @deprecated Use {@see MAIN_REQUEST} instead
2929
*/
30-
public const MASTER_REQUEST = self::MAIN_REQUEST;
30+
public const MASTER_REQUEST = DeprecatedConstants::MASTER_REQUEST;
3131

3232
/**
3333
* Handles a Request to convert it to a Response.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy