Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit da02720

Browse filesBrowse files
Matthew Coveyfabpot
Matthew Covey
authored andcommitted
[HttpFoundation] Deprecate upload_progress.* and url_rewriter.tags session options
1 parent 626d9aa commit da02720
Copy full SHA for da02720

File tree

Expand file treeCollapse file tree

4 files changed

+11
-9
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+11
-9
lines changed

‎UPGRADE-5.4.md

Copy file name to clipboardExpand all lines: UPGRADE-5.4.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ HttpFoundation
4040
--------------
4141

4242
* Mark `Request::get()` internal, use explicit input sources instead
43+
* Deprecate `upload_progress.*` and `url_rewriter.tags` session options
4344

4445
Messenger
4546
---------

‎src/Symfony/Component/HttpFoundation/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/CHANGELOG.md
+1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php
+7-7Lines 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.

‎src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ public function testCookieOptions()
195195
public function testSessionOptions()
196196
{
197197
$options = [
198-
'url_rewriter.tags' => 'a=href',
198+
'trans_sid_tags' => 'a=href',
199199
'cache_expire' => '200',
200200
];
201201

202202
$this->getStorage($options);
203203

204-
$this->assertSame('a=href', ini_get('url_rewriter.tags'));
204+
$this->assertSame('a=href', ini_get('session.trans_sid_tags'));
205205
$this->assertSame('200', ini_get('session.cache_expire'));
206206
}
207207

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.