Skip to content

Commit ba0aeb1

Browse files
andersonamullerjderusse
authored andcommitted
[HttpFoundation] Typo on deprecation package name
1 parent 864012b commit ba0aeb1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Request.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ public function overrideGlobals()
595595
public static function setTrustedProxies(array $proxies, int $trustedHeaderSet)
596596
{
597597
if (self::HEADER_X_FORWARDED_ALL === $trustedHeaderSet) {
598-
trigger_deprecation('symfony/http-fundation', '5.2', 'The "HEADER_X_FORWARDED_ALL" constant is deprecated, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead.');
598+
trigger_deprecation('symfony/http-foundation', '5.2', 'The "HEADER_X_FORWARDED_ALL" constant is deprecated, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead.');
599599
}
600600
self::$trustedProxies = array_reduce($proxies, function ($proxies, $proxy) {
601601
if ('REMOTE_ADDR' !== $proxy) {

Tests/RequestTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,7 @@ public function preferSafeContentData()
25032503
*/
25042504
public function testXForwarededAllConstantDeprecated()
25052505
{
2506-
$this->expectDeprecation('Since symfony/http-fundation 5.2: The "HEADER_X_FORWARDED_ALL" constant is deprecated, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead.');
2506+
$this->expectDeprecation('Since symfony/http-foundation 5.2: The "HEADER_X_FORWARDED_ALL" constant is deprecated, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead.');
25072507

25082508
Request::setTrustedProxies([], Request::HEADER_X_FORWARDED_ALL);
25092509
}

0 commit comments

Comments
 (0)