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 4c98001

Browse filesBrowse files
committed
feature #26334 [SecurityBundle] Deprecate switch_user.stateless config node (chalasr)
This PR was merged into the 4.1-dev branch. Discussion ---------- [SecurityBundle] Deprecate switch_user.stateless config node | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | symfony/symfony-docs#8447 unused since 4.0. Commits ------- 5781b8f [SecurityBundle] Deprecate switch_user.stateless config node
2 parents a5f58f2 + 5781b8f commit 4c98001
Copy full SHA for 4c98001

File tree

Expand file treeCollapse file tree

12 files changed

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

12 files changed

+14
-11
lines changed

‎UPGRADE-4.1.md

Copy file name to clipboardExpand all lines: UPGRADE-4.1.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ SecurityBundle
7070
--------------
7171

7272
* The `logout_on_user_change` firewall option is deprecated.
73+
* The `switch_user.stateless` firewall option is deprecated, use the `stateless` option instead.
7374
* The `SecurityUserValueResolver` class is deprecated, use
7475
`Symfony\Component\Security\Http\Controller\UserValueResolver` instead.
7576

‎UPGRADE-5.0.md

Copy file name to clipboardExpand all lines: UPGRADE-5.0.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ SecurityBundle
6565
--------------
6666

6767
* The `logout_on_user_change` firewall option has been removed.
68+
* The `switch_user.stateless` firewall option has been removed.
6869
* The `SecurityUserValueResolver` class has been removed.
6970

7071
Translation

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,10 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
249249
->scalarNode('provider')->end()
250250
->scalarNode('parameter')->defaultValue('_switch_user')->end()
251251
->scalarNode('role')->defaultValue('ROLE_ALLOWED_TO_SWITCH')->end()
252-
->booleanNode('stateless')->defaultValue(false)->end()
252+
->booleanNode('stateless')
253+
->setDeprecated('The "%path%.%node%" configuration key has been deprecated in Symfony 4.1.')
254+
->defaultValue(false)
255+
->end()
253256
->end()
254257
->end()
255258
;

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function testFirewalls()
111111
array(
112112
'parameter' => '_switch_user',
113113
'role' => 'ROLE_ALLOWED_TO_SWITCH',
114-
'stateless' => true,
114+
'stateless' => false,
115115
),
116116
),
117117
array(

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
'http_basic' => true,
6767
'form_login' => true,
6868
'anonymous' => true,
69-
'switch_user' => array('stateless' => true),
69+
'switch_user' => true,
7070
'x509' => true,
7171
'remote_user' => true,
7272
'logout' => true,

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/no_custom_user_checker.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/no_custom_user_checker.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
'http_basic' => true,
1818
'form_login' => true,
1919
'anonymous' => true,
20-
'switch_user' => array('stateless' => true),
20+
'switch_user' => true,
2121
'x509' => true,
2222
'remote_user' => true,
2323
'logout' => true,

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<http-basic />
5050
<form-login />
5151
<anonymous />
52-
<switch-user stateless="true" />
52+
<switch-user />
5353
<x509 />
5454
<remote-user />
5555
<user-checker />

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/no_custom_user_checker.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/no_custom_user_checker.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<http-basic />
1818
<form-login />
1919
<anonymous />
20-
<switch-user stateless="true" />
20+
<switch-user />
2121
<x509 />
2222
<remote-user />
2323
<user-checker />

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ security:
4949
form_login: true
5050
anonymous: true
5151
switch_user:
52-
stateless: true
5352
x509: true
5453
remote_user: true
5554
logout: true

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/no_custom_user_checker.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/no_custom_user_checker.yml
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ security:
1212
http_basic: true
1313
form_login: true
1414
anonymous: true
15-
switch_user:
16-
stateless: true
15+
switch_user: true
1716
x509: true
1817
remote_user: true
1918
logout: true

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function testSwitchUserNotStatelessOnStatelessFirewall()
132132
'some_firewall' => array(
133133
'stateless' => true,
134134
'http_basic' => null,
135-
'switch_user' => array('stateless' => false),
135+
'switch_user' => true,
136136
),
137137
),
138138
));

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/JsonLogin/switchuser_stateless.yml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/JsonLogin/switchuser_stateless.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ security:
99
user_can_switch: { password: test, roles: [ROLE_USER, ROLE_ALLOWED_TO_SWITCH] }
1010
firewalls:
1111
main:
12+
stateless: true
1213
switch_user:
1314
parameter: X-Switch-User
14-
stateless: true

0 commit comments

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