8000 minor #24920 [SecurityBundle] Add missing quotes in deprecation messa… · symfony/symfony@054e07f · GitHub
[go: up one dir, main page]

Skip to content

Commit 054e07f

Browse files
author
Robin Chalas
committed
minor #24920 [SecurityBundle] Add missing quotes in deprecation messages (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [SecurityBundle] Add missing quotes in deprecation messages | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Quotes in deprecation messages allow prettier display in the profiler panel (quoted strings are in bold). We should be more careful when writing/merging deprecation messages, as there are much more that are missing useful quotes (help welcomed, starting from 3.3). Commits ------- 6dd62e5 [SecurityBundle] Add missing quotes in deprecation messages
2 parents f1a1181 + 6dd62e5 commit 054e07f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function process(ContainerBuilder $container)
4646
$class = $container->getParameterBag()->resolveValue($definition->getClass());
4747

4848
if (!is_a($class, VoterInterface::class, true)) {
49-
@trigger_error(sprintf('Using a security.voter tag on a class without implementing the %1$s is deprecated as of 3.4 and will be removed in 4.0. Implement the %1$s instead.', VoterInterface::class), E_USER_DEPRECATED);
49+
@trigger_error(sprintf('Using a "security.voter" tag on a class without implementing the "%s" is deprecated as of 3.4 and will be removed in 4.0. Implement the interface instead.', VoterInterface::class), E_USER_DEPRECATED);
5050
}
5151

5252
if (!method_exists($class, 'vote')) {

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class HttpDigestFactory implements SecurityFactoryInterface
2828
public function __construct($triggerDeprecation = true)
2929
{
3030
if ($triggerDeprecation) {
31-
@trigger_error(sprintf('The %s class and the whole HTTP digest authentication system is deprecated since 3.4 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED);
31+
@trigger_error(sprintf('The "%s" class and the whole HTTP digest authentication system is deprecated since 3.4 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED);
3232
}
3333
}
3434

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ private function createFirewalls($config, ContainerBuilder $container)
280280
}
281281

282282
if (!isset($firewall['logout_on_user_change']) || !$firewall['logout_on_user_change']) {
283-
@trigger_error('Setting logout_on_user_change to false is deprecated as of 3.4 and will always be true in 4.0. Set logout_on_user_change to true in your firewall configuration.', E_USER_DEPRECATED);
283+
@trigger_error('Setting "logout_on_user_change" to false is deprecated as of 3.4 and will always be true in 4.0. Set it to true in your firewall configuration.', E_USER_DEPRECATED);
284284
}
285285

286286
$contextListenerDefinition->addMethodCall('setLogoutOnUserChange', array($firewall['logout_on_user_change']));

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Compiler/AddSecurityVotersPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testThatSecurityVotersAreProcessedInPriorityOrder()
7272

7373
/**
7474
* @group legacy
75-
* @expectedDeprecation Using a security.voter tag on a class without implementing the Symfony\Component\Security\Core\Authorization\Voter\VoterInterface is deprecated as of 3.4 and will be removed in 4.0. Implement the Symfony\Component\Security\Core\Authorization\Voter\VoterInterface instead.
75+
* @expectedDeprecation Using a "security.voter" tag on a class without implementing the "Symfony\Component\Security\Core\Authorization\Voter\VoterInterface" is deprecated as of 3.4 and will be removed in 4.0. Implement the interface instead.
7676
*/
7777
public function testVoterMissingInterface()
7878
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function testDisableRoleHierarchyVoter()
125125

126126
/**
127127
* @group legacy
128-
* @expectedDeprecation Setting logout_on_user_change to false is deprecated as of 3.4 and will always be true in 4.0. Set logout_on_user_change to true in your firewall configuration.
128+
* @expectedDeprecation Setting "logout_on_user_change" to false is deprecated as of 3.4 and will always be true in 4.0. Set it to true in your firewall configuration.
129129
*/
130130
public function testDeprecationForUserLogout()
131131
{

0 commit comments

Comments
 (0)
0