You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trigger_error(sprintf('The %s() method expects a bit field of Request::HEADER_* as second argument since version 3.3. Defining it will be required in 4.0. ', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('The "%s()" method is deprecated since version 3.3 and will be removed in 4.0. Use the $trustedHeaderSet argument of the Request::setTrustedProxies() method instead.', __METHOD__), E_USER_DEPRECATED);
661
-
662
-
if (!array_key_exists($key, self::$trustedHeaders)) {
663
-
thrownew \InvalidArgumentException(sprintf('Unable to set the trusted header name for key "%s".', $key));
664
-
}
665
-
666
-
self::$trustedHeaders[$key] = $value;
667
-
668
-
if (null !== $value) {
669
-
self::$trustedHeaderNames[$key] = $value;
670
-
self::$trustedHeaderSet |= $key;
671
-
} else {
672
-
self::$trustedHeaderSet &= ~$key;
673
-
}
674
-
}
675
-
676
-
/**
677
-
* Gets the trusted proxy header name.
678
-
*
679
-
* @param string $key The header key
680
-
*
681
-
* @return string The header name
682
-
*
683
-
* @throws \InvalidArgumentException
684
-
*
685
-
* @deprecated since version 3.3, to be removed in 4.0. Use the Request::getTrustedHeaderSet() method instead.
686
-
*/
687
-
publicstaticfunctiongetTrustedHeaderName($key)
688
-
{
689
-
if (2 > func_num_args() || func_get_arg(1)) {
690
-
@trigger_error(sprintf('The "%s()" method is deprecated since version 3.3 and will be removed in 4.0. Use the Request::getTrustedHeaderSet() method instead.', __METHOD__), E_USER_DEPRECATED);
691
-
}
692
-
693
-
if (!array_key_exists($key, self::$trustedHeaders)) {
694
-
thrownew \InvalidArgumentException(sprintf('Unable to get the trusted header name for key "%s".', $key));
695
-
}
696
-
697
-
returnself::$trustedHeaders[$key];
698
-
}
699
-
700
607
/**
701
608
* Normalizes a query string.
702
609
*
@@ -864,7 +771,7 @@ public function getClientIps()
// This deprecation should be turned into a BadMethodCallException in 4.0 (without adding the argument in the signature)
1530
-
// then setting $andCacheable to false should be deprecated in 4.1
1531
-
@trigger_error('Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is deprecated since version 3.2 and will throw an exception in 4.0. Disable checking only for cacheable methods by calling the method with `false` as first argument or use the Request::isMethodCacheable() instead.', E_USER_DEPRECATED);
// setting $andCacheable to false should be deprecated in 4.1
1437
+
thrownew \BadMethodCallException('Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is not supported.', E_USER_DEPRECATED);
0 commit comments