-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] add back support for legacy constant values #23074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm not sure we should go that far in BC, especially since this is non serializable data (since we're talking about consts used in static props only.) |
The thing is we even advised to use these strings in the previous docblocks of |
@@ -672,7 +672,17 @@ public static function setTrustedHeaderName($key, $value) | ||
{ | ||
@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); | ||
|
||
if (!array_key_exists($key, self::$trustedHeaders)) { | ||
if ('forwared' === $key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forwarded ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed
@@ -672,7 +672,17 @@ public static function setTrustedHeaderName($key, $value) | ||
{ | ||
@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); | ||
|
||
if (!array_key_exists($key, self::$trustedHeaders)) { | ||
if ('forwared' === $key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed
Thank you @xabbuh. |
…es (xabbuh) This PR was merged into the 3.3 branch. Discussion ---------- [HttpFoundation] add back support for legacy constant values | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Due to the data type change of the `Request::HEADER_` constants in Symfony 3.3 #23067 introduced a small BC break if someone used the old constant values statically instead of referring to the constants themselves. Commits ------- fddd754 add back support for legacy constant values
Due to the data type change of the
Request::HEADER_
constants in Symfony 3.3 #23067 introduced a small BC break if someone used the old constant values statically instead of referring to the constants themselves.