8000 [HttpFoundation] Deprecate upload_progress.* and url_rewriter.tags se… · kafene/symfony@713949d · GitHub
[go: up one dir, main page]

Skip to content

Commit 713949d

Browse files
author
Matthew Covey
committed
[HttpFoundation] Deprecate upload_progress.* and url_rewriter.tags session options
Related to [issue symfony#43284](symfony#43284). Deprecate support for configuring session.upload_progress.* - these options are `PHP_INI_PERDIR` options and can not be configured at runtime via `ini_set`. Deprecate support for configuring `url_rewriter.tags` - as of PHP 7.1.0, this option is no longer used for session configuration and that setting is now `session.trans_sid_tags`. `url_rewriter.tags` is used only by `output_add_rewrite_var`.
1 parent 626d9aa commit 713949d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/Symfony/Component/HttpFoundation/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add the `litespeed_finish_request` method to work with Litespeed
8+
* Deprecate `upload_progress.*` and `url_rewriter.tags` session options
89

910
5.3
1011
---

src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,6 @@ class NativeSessionStorage implements SessionStorageInterface
9090
* use_cookies, "1"
9191
* use_only_cookies, "1"
9292
* use_trans_sid, "0"
93-
* upload_progress.enabled, "1"
94-
* upload_progress.cleanup, "1"
95-
* upload_progress.prefix, "upload_progress_"
96-
* upload_progress.name, "PHP_SESSION_UPLOAD_PROGRESS"
97-
* upload_progress.freq, "1%"
98-
* upload_progress.min-freq, "1"
99-
* url_rewriter.tags, "a=href,area=href,frame=src,form=,fieldset="
10093
* sid_length, "32"
10194
* sid_bits_per_character, "5"
10295
* trans_sid_hosts, $_SERVER['HTTP_HOST']
@@ -383,6 +376,13 @@ public function setOptions(array $options)
383376

384377
foreach ($options as $key => $value) {
385378
if (isset($validOptions[$key])) {
379+
if (\str_starts_with($key, 'upload_progress.')) {
380+
trigger_deprecation('symfony/http-foundation', '5.4', 'Support for the "%s" session option is deprecated. The settings prefixed with "session.upload_progress." can not be changed at runtime.', $key);
381+
continue;
382+
}
383+
if ('url_rewriter.tags' === $key) {
384+
trigger_deprecation('symfony/http-foundation', '5.4', 'Support for the "%s" session option is deprecated. Use "trans_sid_tags" instead.', $key);
385+
}
386386
if ('cookie_samesite' === $key && \PHP_VERSION_ID < 70300) {
387387
// PHP < 7.3 does not support same_site cookies. We will emulate it in
388388
// the start() method instead.

0 commit comments

Comments
 (0)
0