Skip to content

[HttpFoundation] remove deprecated code #41334

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

Merged
merged 1 commit into from
May 23, 2021

Conversation

azjezz
Copy link
Contributor

@azjezz azjezz commented May 20, 2021

Q A
Branch? 6.0
Bug fix? no
New feature? no
Deprecations? no
Tickets n/a
License MIT
Doc PR symfony/symfony-docs#...

@carsonbot carsonbot added this to the 6.0 milestone May 20, 2021
@azjezz azjezz force-pushed the http-foundation/input branch 2 times, most recently from 0e0d078 to 6e74e9b Compare May 20, 2021 13:57
@azjezz azjezz changed the title [HttpFoundation] remove deprecations [HttpFoundation] remove deprecated code May 20, 2021
@carsonbot
Copy link

Hey!

I think @pyrech has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@azjezz azjezz force-pushed the http-foundation/input branch from 6e74e9b to 0f7f3bc Compare May 21, 2021 17:00
@azjezz
Copy link
Contributor Author

azjezz commented May 21, 2021

RFR, failure is unrelated.

@@ -16,7 +16,7 @@
/**
* InputBag is a container for user input values such as $_GET, $_POST, $_REQUEST, and $_COOKIE.
*
* @author Saif Eddin Gmati <saif.gmati@symfony.com>
* @author Saif Eddin Gmati <azjezz@protonmail.com>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please submit this change on 5.2

@@ -27,16 +27,16 @@ final class InputBag extends ParameterBag
*
* @return string|int|float|bool|null
*/
public function get(string $key, $default = null)
public function get(string $key, $default = null): string | int | float | bool | null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverting as adding return types is a separate topic

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.');
}
self::$trustedProxies = array_reduce($proxies, function ($proxies, $proxy) {
self::$trustedProxies = array_reduce($proxies, static function ($proxies, $proxy) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverting as this might create needles merge conflicts and is not needed: the surrounding method is already static, so is this closure.

Signed-off-by: azjezz <azjezz@protonmail.com>
@nicolas-grekas nicolas-grekas force-pushed the http-foundation/input branch from 0f7f3bc to 8312f90 Compare May 23, 2021 16:42
@nicolas-grekas
Copy link
Member

Thank you @azjezz.

@nicolas-grekas nicolas-grekas merged commit 8d9feff into symfony:6.0 May 23, 2021
@azjezz azjezz deleted the http-foundation/input branch May 23, 2021 16:48
fabpot added a commit that referenced this pull request Oct 12, 2021
…obion)

This PR was merged into the 6.0 branch.

Discussion
----------

[HttpFoundation] remove legacy session lifetime logic

| Q             | A
| ------------- | ---
| Branch?       | 6.0
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This part was only relevant for keeping bc with the old lifetime data. Has been forgotten to be removed in #41334 and #43120

Commits
-------

54a578b [HttpFoundation] remove legacy session lifetime logic
@fabpot fabpot mentioned this pull request Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants