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 e3396ea

Browse filesBrowse files
committed
trigger some deprecations for legacy methods
1 parent 82b36e4 commit e3396ea
Copy full SHA for e3396ea

40 files changed

+80
-63
lines changed

‎UPGRADE-4.1.md

Copy file name to clipboard
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
UPGRADE FROM 4.0 to 4.1
2+
=======================
3+
4+
Security
5+
--------
6+
7+
* The `ContextListener::setLogoutOnUserChange()` method is deprecated and will be removed in 5.0.
8+
9+
SecurityBundle
10+
--------------
11+
12+
* The `logout_on_user_change` firewall option is deprecated and will be removed in 5.0.
13+
14+
Translation
15+
-----------
16+
17+
* The `FileDumper::setBackup()` method is deprecated and will be removed in 5.0.
18+
* The `TranslationWriter::disableBackup()` method is deprecated and will be removed in 5.0.

‎UPGRADE-5.0.md

Copy file name to clipboard
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
UPGRADE FROM 4.x to 5.0
2+
=======================
3+
4+
Security
5+
--------
6+
7+
* The `ContextListener::setLogoutOnUserChange()` method has been removed.
8+
9+
SecurityBundle
10+
--------------
11+
12+
* The `logout_on_user_change` firewall option has been removed.
13+
14+
Translation
15+
-----------
16+
17+
* The `FileDumper::setBackup()` method has been removed.
18+
* The `TranslationWriter::disableBackup()` method has been removed.

‎src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
4.1.0
5+
-----
6+
7+
* The `logout_on_user_change` firewall option is deprecated and will be removed in 5.0.
8+
49
4.0.0
510
-----
611

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
+1-11Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
200200
->booleanNode('logout_on_user_change')
201201
->defaultTrue()
202202
->info('When true, it will trigger a logout for the user if something has changed.')
203+
->setDeprecated('The "%path%.%node%" configuration key has been deprecated in Symfony 4.1 and will be removed in 5.0.')
203204
->end()
204205
->arrayNode('logout')
205206
->treatTrueLike(array())
@@ -290,17 +291,6 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
290291
return $firewall;
291292
})
292293
->end()
293-
->validate()
294-
->ifTrue(function ($v) {
295-
return (isset($v['stateless']) && true === $v['stateless']) || (isset($v['security']) && false === $v['security']);
296-
})
297-
->then(function ($v) {
298-
// this option doesn't change behavior when true when stateless, so prevent deprecations
299-
$v['logout_on_user_change'] = true;
300-
301-
return $v;
302-
})
303-
->end()
304294
;
305295
}
306296

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ private function createFirewalls($config, ContainerBuilder $container)
181181
$customUserChecker = true;
182182
}
183183

184-
$contextListenerDefinition->addMethodCall('setLogoutOnUserChange', array($firewall['logout_on_user_change']));
185-
186184
$configId = 'security.firewall.map.config.'.$name;
187185

188186
list($matcher, $listeners, $exceptionListener) = $this->createFirewall($container, $name, $firewall, $authenticationProviders, $providerIds, $configId);
@@ -410,7 +408,7 @@ private function createAuthenticationListeners($container, $id, $firewall, &$aut
410408
throw new InvalidConfigurationException(sprintf('Invalid firewall "%s": user provider "%s" not found.', $id, $firewall[$key]['provider']));
411409
}
412410
$userProvider = $providerIds[$normalizedName];
413-
} elseif($defaultProvider) {
411+
} elseif ($defaultProvider) {
414412
$userProvider = $defaultProvider;
415413
} else {
416414
throw new InvalidConfigurationException(sprintf('Not configuring explicitly the provider for the "%s" listener on "%s" firewall is ambiguous as there is more than one registered provider.', $key, $id));

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/argon2i_encoder.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
'main' => array(
1414
'form_login' => false,
1515
'http_basic' => null,
16-
'logout_on_user_change' => true,
1716
),
1817
),
1918
));

‎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
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
'logout' => true,
7373
'remember_me' => array('secret' => 'TheSecret'),
7474
'user_checker' => null,
75-
'logout_on_user_change' => true,
7675
),
7776
'host' => array(
7877
'provider' => 'default',
@@ -81,14 +80,12 @@
8180
'methods' => array('GET', 'POST'),
8281
'anonymous' => true,
8382
'http_basic' => true,
84-
'logout_on_user_change' => true,
8583
),
8684
'with_user_checker' => array(
8785
'provider' => 'default',
8886
'user_checker' => 'app.user_checker',
8987
'anonymous' => true,
9088
'http_basic' => true,
91-
'logout_on_user_change' => true,
9289
),
9390
),
9491

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_provider.php
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515
'main' => array(
1616
'provider' => 'default',
1717
'form_login' => true,
18-
'logout_on_user_change' => true,
1918
),
2019
'other' => array(
2120
'provider' => 'with-dash',
2221
'form_login' => true,
23-
'logout_on_user_change' => true,
2422
),
2523
),
2624
));

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_undefined_provider.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
'main' => array(
1313
'provider' => 'undefined',
1414
'form_login' => true,
15-
'logout_on_user_change' => true,
1615
),
1716
),
1817
));

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_provider.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
'firewalls' => array(
1212
'main' => array(
1313
'form_login' => array('provider' => 'default'),
14-
'logout_on_user_change' => true,
1514
),
1615
),
1716
));

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_undefined_provider.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
'firewalls' => array(
1212
'main' => array(
1313
'form_login' => array('provider' => 'undefined'),
14-
'logout_on_user_change' => true,
1514
),
1615
),
1716
));

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
'main' => array(
1212
'form_login' => false,
1313
'http_basic' => null,
14-
'logout_on_user_change' => true,
1514
),
1615
),
1716

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge_import.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
'form_login' => array(
77
'login_path' => '/login',
88
),
9-
'logout_on_user_change' => true,
109
),
1110
),
1211
'role_hierarchy' => array(

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
'catch_exceptions' => false,
1414
'token_provider' => 'token_provider_id',
1515
),
16-
'logout_on_user_change' => true,
1716
),
1817
),
1918
));

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/argon2i_encoder.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<provider name="default" id="foo" />
1212

13-
<firewall name="main" logout-on-user-change="true">
13+
<firewall name="main">
1414
<form-login login-path="/login" />
1515
</firewall>
1616
</config>

‎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
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@
5757
<remember-me secret="TheSecret"/>
5858
</firewall>
5959

60-
<firewall name="host" pattern="/test" host="foo\.example\.org" methods="GET,POST" logout-on-user-change="true" provider="default">
60+
<firewall name="host" pattern="/test" host="foo\.example\.org" methods="GET,POST" provider="default">
6161
<anonymous />
6262
<http-basic />
6363
</firewall>
6464

65-
<firewall name="with_user_checker" logout-on-user-change="true" provider="default">
65+
<firewall name="with_user_checker" provider="default">
6666
<anonymous />
6767
<http-basic />
6868
<user-checker>app.user_checker</user-checker>

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_provider.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</sec:providers>
1212

1313
<sec:firewalls>
14-
<sec:firewall name="main" provider="with-dash" logout-on-user-change="true">
14+
<sec:firewall name="main" provider="with-dash">
1515
<sec:form_login />
1616
</sec:firewall>
1717
</sec:firewalls>

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_undefined_provider.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</sec:providers>
1212

1313
<sec:firewalls>
14-
<sec:firewall name="main" provider="undefined" logout-on-user-change="true">
14+
<sec:firewall name="main" provider="undefined">
1515
<sec:form_login />
1616
</sec:firewall>
1717
</sec:firewalls>

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_provider.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</sec:providers>
1212

1313
<sec:firewalls>
14-
<sec:firewall name="main" logout-on-user-change="true">
14+
<sec:firewall name="main">
1515
<sec:form_login provider="default" />
1616
</sec:firewall>
1717
</sec:firewalls>

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_undefined_provider.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</sec:providers>
1212

1313
<sec:firewalls>
14-
<sec:firewall name="main" logout-on-user-change="true">
14+
<sec:firewall name="main">
1515
<sec:form_login provider="undefined" />
1616
</sec:firewall>
1717
</sec:firewalls>

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<sec:config>
1313
<sec:provider name="default" id="foo" />
1414

15-
<sec:firewall name="main" form-login="false" logout-on-user-change="true">
15+
<sec:firewall name="main" form-login="false">
1616
<sec:http-basic />
1717
</sec:firewall>
1818

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge_import.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
77

88
<config>
9-
<firewall name="main" logout-on-user-change="true">
9+
<firewall name="main">
1010
<form-login login-path="/login" />
1111
</firewall>
1212

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/remember_me_options.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<sec:providers>
1010
<sec:default id="foo"/>
1111
</sec:providers>
12-
<sec:firewall name="main" logout-on-user-change="true">
12+
<sec:firewall name="main">
1313
<sec:form-login/>
1414
<sec:remember-me secret="TheSecret" catch-exceptions="false" token-provider="token_provider_id" />
1515
</sec:firewall>

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/argon2i_encoder.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ security:
1010
main:
1111
form_login: false
1212
http_basic: ~
13-
logout_on_user_change: true

‎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
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,12 @@ security:
6464
methods: [GET,POST]
6565
anonymous: true
6666
http_basic: true
67-
logout_on_user_change: true
6867

6968
with_user_checker:
7069
provider: default
7170
anonymous: ~
7271
http_basic: ~
7372
user_checker: app.user_checker
74-
logout_on_user_change: true
7573

7674
role_hierarchy:
7775
ROLE_ADMIN: ROLE_USER

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_provider.yml
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ security:
1111
main:
1212
provider: default
1313
form_login: true
14-
logout_on_user_change: true
1514
other:
1615
provider: with-dash
1716
form_login: true
18-
logout_on_user_change: true

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_undefined_provider.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ security:
88
main:
99
provider: undefined
1010
form_login: true
11-
logout_on_user_change: true

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_provider.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ security:
88
main:
99
form_login:
1010
provider: default
11-
logout_on_user_change: true

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_undefined_provider.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ security:
88
main:
99
form_login:
1010
provider: undefined
11-
logout_on_user_change: true

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ security:
99
main:
1010
form_login: false
1111
http_basic: ~
12-
logout_on_user_change: true
1312

1413
role_hierarchy:
1514
FOO: [MOO]

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge_import.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ security:
33
main:
44
form_login:
55
login_path: /login
6-
logout_on_user_change: true
76

87
role_hierarchy:
98
FOO: BAR

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/remember_me_options.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ security:
1010
secret: TheSecret
1111
catch_exceptions: false
1212
token_provider: token_provider_id
13-
logout_on_user_change: true

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class MainConfigurationTest extends TestCase
2929
),
3030
'firewalls' => array(
3131
'stub' => array(),
32-
'logout_on_user_change' => true,
3332
),
3433
);
3534

@@ -77,7 +76,6 @@ public function testCsrfAliases()
7776
'csrf_token_generator' => 'a_token_generator',
7877
'csrf_token_id' => 'a_token_id',
7978
),
80-
'logout_on_user_change' => true,
8179
),
8280
),
8381
);
@@ -107,7 +105,6 @@ public function testUserCheckers()
107105
'firewalls' => array(
108106
'stub' => array(
109107
'user_checker' => 'app.henk_checker',
110-
'logout_on_user_change' => true,
111108
),
112109
),
113110
);

0 commit comments

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