diff --git a/UPGRADE-4.1.md b/UPGRADE-4.1.md
new file mode 100644
index 0000000000000..0f9131e33e309
--- /dev/null
+++ b/UPGRADE-4.1.md
@@ -0,0 +1,18 @@
+UPGRADE FROM 4.0 to 4.1
+=======================
+
+Security
+--------
+
+ * The `ContextListener::setLogoutOnUserChange()` method is deprecated and will be removed in 5.0.
+
+SecurityBundle
+--------------
+
+ * The `logout_on_user_change` firewall option is deprecated and will be removed in 5.0.
+
+Translation
+-----------
+
+ * The `FileDumper::setBackup()` method is deprecated and will be removed in 5.0.
+ * The `TranslationWriter::disableBackup()` method is deprecated and will be removed in 5.0.
diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md
new file mode 100644
index 0000000000000..337a5bac7eac9
--- /dev/null
+++ b/UPGRADE-5.0.md
@@ -0,0 +1,18 @@
+UPGRADE FROM 4.x to 5.0
+=======================
+
+Security
+--------
+
+ * The `ContextListener::setLogoutOnUserChange()` method has been removed.
+
+SecurityBundle
+--------------
+
+ * The `logout_on_user_change` firewall option has been removed.
+
+Translation
+-----------
+
+ * The `FileDumper::setBackup()` method has been removed.
+ * The `TranslationWriter::disableBackup()` method has been removed.
diff --git a/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md b/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md
index 1789357b85162..15000095df758 100644
--- a/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md
+++ b/src/Symfony/Bundle/SecurityBundle/CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
=========
+4.1.0
+-----
+
+ * The `logout_on_user_change` firewall option is deprecated and will be removed in 5.0.
+
4.0.0
-----
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
index 0ca7e7f4b7f51..9ad36201ef690 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
@@ -200,6 +200,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
->booleanNode('logout_on_user_change')
->defaultTrue()
->info('When true, it will trigger a logout for the user if something has changed.')
+ ->setDeprecated('The "%path%.%node%" configuration key has been deprecated in Symfony 4.1 and will be removed in 5.0.')
->end()
->arrayNode('logout')
->treatTrueLike(array())
@@ -290,17 +291,6 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
return $firewall;
})
->end()
- ->validate()
- ->ifTrue(function ($v) {
- return (isset($v['stateless']) && true === $v['stateless']) || (isset($v['security']) && false === $v['security']);
- })
- ->then(function ($v) {
- // this option doesn't change behavior when true when stateless, so prevent deprecations
- $v['logout_on_user_change'] = true;
-
- return $v;
- })
- ->end()
;
}
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
index 8351c86112212..f9c4c4ab7c997 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
@@ -181,8 +181,6 @@ private function createFirewalls($config, ContainerBuilder $container)
$customUserChecker = true;
}
- $contextListenerDefinition->addMethodCall('setLogoutOnUserChange', array($firewall['logout_on_user_change']));
-
$configId = 'security.firewall.map.config.'.$name;
list($matcher, $listeners, $exceptionListener) = $this->createFirewall($container, $name, $firewall, $authenticationProviders, $providerIds, $configId);
@@ -410,7 +408,7 @@ private function createAuthenticationListeners($container, $id, $firewall, &$aut
throw new InvalidConfigurationException(sprintf('Invalid firewall "%s": user provider "%s" not found.', $id, $firewall[$key]['provider']));
}
$userProvider = $providerIds[$normalizedName];
- } elseif($defaultProvider) {
+ } elseif ($defaultProvider) {
$userProvider = $defaultProvider;
} else {
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));
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/argon2i_encoder.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/argon2i_encoder.php
index 23ff1799c8300..d315f88170368 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/argon2i_encoder.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/argon2i_encoder.php
@@ -13,7 +13,6 @@
'main' => array(
'form_login' => false,
'http_basic' => null,
- 'logout_on_user_change' => true,
),
),
));
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php
index 7290676a2bfc7..d60bca39e4a51 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/container1.php
@@ -72,7 +72,6 @@
'logout' => true,
'remember_me' => array('secret' => 'TheSecret'),
'user_checker' => null,
- 'logout_on_user_change' => true,
),
'host' => array(
'provider' => 'default',
@@ -81,14 +80,12 @@
'methods' => array('GET', 'POST'),
'anonymous' => true,
'http_basic' => true,
- 'logout_on_user_change' => true,
),
'with_user_checker' => array(
'provider' => 'default',
'user_checker' => 'app.user_checker',
'anonymous' => true,
'http_basic' => true,
- 'logout_on_user_change' => true,
),
),
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_provider.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_provider.php
index da218fc61c9cf..ff9d9f6b89df6 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_provider.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_provider.php
@@ -15,12 +15,10 @@
'main' => array(
'provider' => 'default',
'form_login' => true,
- 'logout_on_user_change' => true,
),
'other' => array(
'provider' => 'with-dash',
'form_login' => true,
- 'logout_on_user_change' => true,
),
),
));
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_undefined_provider.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_undefined_provider.php
index 46a51f91fdd22..78d461efe38d1 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_undefined_provider.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/firewall_undefined_provider.php
@@ -12,7 +12,6 @@
'main' => array(
'provider' => 'undefined',
'form_login' => true,
- 'logout_on_user_change' => true,
),
),
));
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_provider.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_provider.php
index 072b70b078a58..d7f1cd6973f36 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_provider.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_provider.php
@@ -11,7 +11,6 @@
'firewalls' => array(
'main' => array(
'form_login' => array('provider' => 'default'),
- 'logout_on_user_change' => true,
),
),
));
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_undefined_provider.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_undefined_provider.php
index 567f8a0d4b2d7..da54f025d1a70 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_undefined_provider.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/listener_undefined_provider.php
@@ -11,7 +11,6 @@
'firewalls' => array(
'main' => array(
'form_login' => array('provider' => 'undefined'),
- 'logout_on_user_change' => true,
),
),
));
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge.php
index eb34a6a6f64b6..50ef504ea4d43 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge.php
@@ -11,7 +11,6 @@
'main' => array(
'form_login' => false,
'http_basic' => null,
- 'logout_on_user_change' => true,
),
),
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge_import.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge_import.php
index 6ed2d18a36709..912b9127ef369 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge_import.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/merge_import.php
@@ -6,7 +6,6 @@
'form_login' => array(
'login_path' => '/login',
),
- 'logout_on_user_change' => true,
),
),
'role_hierarchy' => array(
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php
index a61fde3dc7309..e0ca4f6dedf3e 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php
@@ -13,7 +13,6 @@
'catch_exceptions' => false,
'token_provider' => 'token_provider_id',
),
- 'logout_on_user_change' => true,
),
),
));
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/argon2i_encoder.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/argon2i_encoder.xml
index dda4d8ec888c8..d9ff22ab82de5 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/argon2i_encoder.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/argon2i_encoder.xml
@@ -10,7 +10,7 @@
-
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml
index 1f317ac2d2697..ef76eef02d2b5 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/container1.xml
@@ -57,12 +57,12 @@
-
+
-
+
app.user_checker
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_provider.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_provider.xml
index 9d37164e8d409..bd87fee4abae9 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_provider.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_provider.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_undefined_provider.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_undefined_provider.xml
index 6a05d48e539b9..f596ac5a6240b 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_undefined_provider.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/firewall_undefined_provider.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_provider.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_provider.xml
index f53b91b00ef78..b1bcd8eae8155 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_provider.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_provider.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_undefined_provider.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_undefined_provider.xml
index 75271ad075f37..725e85a1d0f27 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_undefined_provider.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/listener_undefined_provider.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge.xml
index 42dc91c9975ef..8a17f6db23c55 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge_import.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge_import.xml
index 051e2a40b3a16..81b8cffd68d9e 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge_import.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/merge_import.xml
@@ -6,7 +6,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
-
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/remember_me_options.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/remember_me_options.xml
index 583720ea1de9b..b6ade91a07970 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/remember_me_options.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/remember_me_options.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/argon2i_encoder.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/argon2i_encoder.yml
index a51e766005456..e88debf658496 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/argon2i_encoder.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/argon2i_encoder.yml
@@ -10,4 +10,3 @@ security:
main:
form_login: false
http_basic: ~
- logout_on_user_change: true
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
index ad90e433be796..9336c13343470 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
@@ -64,14 +64,12 @@ security:
methods: [GET,POST]
anonymous: true
http_basic: true
- logout_on_user_change: true
with_user_checker:
provider: default
anonymous: ~
http_basic: ~
user_checker: app.user_checker
- logout_on_user_change: true
role_hierarchy:
ROLE_ADMIN: ROLE_USER
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_provider.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_provider.yml
index b8da52b6e45d3..11c329aa8e2fe 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_provider.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_provider.yml
@@ -11,8 +11,6 @@ security:
main:
provider: default
form_login: true
- logout_on_user_change: true
other:
provider: with-dash
form_login: true
- logout_on_user_change: true
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_undefined_provider.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_undefined_provider.yml
index 3385fc3485a0e..ec2664054009c 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_undefined_provider.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/firewall_undefined_provider.yml
@@ -8,4 +8,3 @@ security:
main:
provider: undefined
form_login: true
- logout_on_user_change: true
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_provider.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_provider.yml
index 53e2784c4b3a9..652f23b5f0425 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_provider.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_provider.yml
@@ -8,4 +8,3 @@ security:
main:
form_login:
provider: default
- logout_on_user_change: true
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_undefined_provider.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_undefined_provider.yml
index ba5f69ede665d..1916df4c2e7ca 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_undefined_provider.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/listener_undefined_provider.yml
@@ -8,4 +8,3 @@ security:
main:
form_login:
provider: undefined
- logout_on_user_change: true
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge.yml
index d8f443c62f34e..60c0bbea558e7 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge.yml
@@ -9,7 +9,6 @@ security:
main:
form_login: false
http_basic: ~
- logout_on_user_change: true
role_hierarchy:
FOO: [MOO]
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge_import.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge_import.yml
index a081003a49578..4f8db0a09f7b4 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge_import.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/merge_import.yml
@@ -3,7 +3,6 @@ security:
main:
form_login:
login_path: /login
- logout_on_user_change: true
role_hierarchy:
FOO: BAR
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/remember_me_options.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/remember_me_options.yml
index 716cd4cf99d14..a521c8c6a803d 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/remember_me_options.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/remember_me_options.yml
@@ -10,4 +10,3 @@ security:
secret: TheSecret
catch_exceptions: false
token_provider: token_provider_id
- logout_on_user_change: true
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php
index c3904dc2baf18..6ecfba2922b67 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php
@@ -29,7 +29,6 @@ class MainConfigurationTest extends TestCase
),
'firewalls' => array(
'stub' => array(),
- 'logout_on_user_change' => true,
),
);
@@ -77,7 +76,6 @@ public function testCsrfAliases()
'csrf_token_generator' => 'a_token_generator',
'csrf_token_id' => 'a_token_id',
),
- 'logout_on_user_change' => true,
),
),
);
@@ -107,7 +105,6 @@ public function testUserCheckers()
'firewalls' => array(
'stub' => array(
'user_checker' => 'app.henk_checker',
- 'logout_on_user_change' => true,
),
),
);
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
index 6a6b5125291bc..7f8eae4f21e5e 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
@@ -38,7 +38,6 @@ public function testInvalidCheckPath()
'form_login' => array(
'check_path' => '/some_area/login_check',
),
- 'logout_on_user_change' => true,
),
),
));
@@ -62,7 +61,6 @@ public function testFirewallWithoutAuthenticationListener()
'firewalls' => array(
'some_firewall' => array(
'pattern' => '/.*',
- 'logout_on_user_change' => true,
),
),
));
@@ -90,7 +88,6 @@ public function testFirewallWithInvalidUserProvider()
'some_firewall' => array(
'pattern' => '/.*',
'http_basic' => array(),
- 'logout_on_user_change' => true,
),
),
));
@@ -113,7 +110,6 @@ public function testDisableRoleHierarchyVoter()
'some_firewall' => array(
'pattern' => '/.*',
'http_basic' => null,
- 'logout_on_user_change' => true,
),
),
));
@@ -137,7 +133,6 @@ public function testSwitchUserNotStatelessOnStatelessFirewall()
'stateless' => true,
'http_basic' => null,
'switch_user' => array('stateless' => false),
- 'logout_on_user_change' => true,
),
),
));
@@ -159,7 +154,6 @@ public function testPerListenerProvider()
'firewalls' => array(
'default' => array(
'http_basic' => array('provider' => 'second'),
- 'logout_on_user_change' => true,
),
),
));
diff --git a/src/Symfony/Component/Security/CHANGELOG.md b/src/Symfony/Component/Security/CHANGELOG.md
index 945e3cb3264b4..2fc862f6e03a7 100644
--- a/src/Symfony/Component/Security/CHANGELOG.md
+++ b/src/Symfony/Component/Security/CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
=========
+4.1.0
+-----
+
+ * The `ContextListener::setLogoutOnUserChange()` method is deprecated and will be removed in 5.0.
+
4.0.0
-----
diff --git a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php
index 67ce5cefaa123..b1673adeb48ac 100644
--- a/src/Symfony/Component/Security/Http/Firewall/ContextListener.php
+++ b/src/Symfony/Component/Security/Http/Firewall/ContextListener.php
@@ -46,8 +46,8 @@ class ContextListener implements ListenerInterface
private $logoutOnUserChange = true;
/**
- * @param TokenStorageInterface $tokenStorage
- * @param iterable|UserProviderInterface[] $userProviders
+ * @param TokenStorageInterface $tokenStorage
+ * @param iterable|UserProviderInterface[] $userProviders
*/
public function __construct(TokenStorageInterface $tokenStorage, iterable $userProviders, string $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, AuthenticationTrustResolverInterface $trustResolver = null)
{
@@ -67,10 +67,12 @@ public function __construct(TokenStorageInterface $tokenStorage, iterable $userP
* Enables deauthentication during refreshUser when the user has changed.
*
* @param bool $logoutOnUserChange
+ *
+ * @deprecated since version 4.1, to be removed in 5.0
*/
public function setLogoutOnUserChange($logoutOnUserChange)
{
- // no-op, method to be deprecated in 4.1
+ @trigger_error(sprintf('The %s() method is deprecated since 4.1 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
}
/**
diff --git a/src/Symfony/Component/Translation/CHANGELOG.md b/src/Symfony/Component/Translation/CHANGELOG.md
index ff6ce7a378d65..daab7fd3fc0eb 100644
--- a/src/Symfony/Component/Translation/CHANGELOG.md
+++ b/src/Symfony/Component/Translation/CHANGELOG.md
@@ -1,6 +1,12 @@
CHANGELOG
=========
+4.1.0
+-----
+
+ * The `FileDumper::setBackup()` method is deprecated and will be removed in 5.0.
+ * The `TranslationWriter::disableBackup()` method is deprecated and will be removed in 5.0.
+
4.0.0
-----
diff --git a/src/Symfony/Component/Translation/Dumper/FileDumper.php b/src/Symfony/Component/Translation/Dumper/FileDumper.php
index 2e047ed7c0e42..a1902d7e22ddb 100644
--- a/src/Symfony/Component/Translation/Dumper/FileDumper.php
+++ b/src/Symfony/Component/Translation/Dumper/FileDumper.php
@@ -46,15 +46,16 @@ public function setRelativePathTemplate($relativePathTemplate)
* Sets backup flag.
*
* @param bool
+ *
+ * @deprecated since version 4.1, to be removed in 5.0
*/
public function setBackup($backup)
{
+ @trigger_error(sprintf('The %s() method is deprecated since 4.1 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
+
if (false !== $backup) {
throw new \LogicException('The backup feature is no longer supported.');
}
-
- // the method is only present to not break BC
- // to be deprecated in 4.1
}
/**
diff --git a/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php b/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php
index c7a7668f87dcf..ab66af13e7d96 100644
--- a/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php
+++ b/src/Symfony/Component/Translation/Tests/Writer/TranslationWriterTest.php
@@ -30,6 +30,9 @@ public function testWrite()
$writer->write(new MessageCatalogue('en'), 'test');
}
+ /**
+ * @group legacy
+ */
public function testDisableBackup()
{
$nonBackupDumper = new NonBackupDumper();
diff --git a/src/Symfony/Component/Translation/Writer/TranslationWriter.php b/src/Symfony/Component/Translation/Writer/TranslationWriter.php
index 56d99cc7729c5..0a9d4751366f1 100644
--- a/src/Symfony/Component/Translation/Writer/TranslationWriter.php
+++ b/src/Symfony/Component/Translation/Writer/TranslationWriter.php
@@ -38,10 +38,13 @@ public function addDumper($format, DumperInterface $dumper)
/**
* Disables dumper backup.
+ *
+ * @deprecated since version 4.1, to be removed in 5.0
*/
public function disableBackup()
{
- // to be deprecated in 4.1
+ @trigger_error(sprintf('The %s() method is deprecated since 4.1 and will be removed in 5.0.', __METHOD__), E_USER_DEPRECATED);
+
foreach ($this->dumpers as $dumper) {
if (method_exists($dumper, 'setBackup')) {
$dumper->setBackup(false);