10000 minor #32866 Sync "not implementing the method" deprecations messages… · symfony/symfony@8ea304d · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ea304d

Browse files
minor #32866 Sync "not implementing the method" deprecations messages (fancyweb)
This PR was merged into the 4.3 branch. Discussion ---------- Sync "not implementing the method" deprecations messages | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Suggested in #32747 (comment) Useful for consistency and for future reference for similar messages. Commits ------- f6fae1c Sync "not implementing the method" deprecations messages
2 parents 9bfc12a + f6fae1c commit 8ea304d

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

src/Symfony/Component/Config/Definition/Builder/NodeDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ public function setPathSeparator(string $separator)
364364
$child->setPathSeparator($separator);
365365
}
366366
} else {
367-
@trigger_error('Passing a ParentNodeDefinitionInterface without getChildNodeDefinitions() is deprecated since Symfony 4.1.', E_USER_DEPRECATED);
367+
@trigger_error(sprintf('Not implementing the "%s::getChildNodeDefinitions()" method in "%s" is deprecated since Symfony 4.1.', ParentNodeDefinitionInterface::class, \get_class($this)), E_USER_DEPRECATED);
368368
}
369369
}
370370

src/Symfony/Component/Form/AbstractExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private function initTypeExtensions()
182182
$extendedTypes[] = $extendedType;
183183
}
184184
} else {
185-
@trigger_error(sprintf('Not implementing the static getExtendedTypes() method in %s when implementing the %s is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.', \get_class($extension), FormTypeExtensionInterface::class), E_USER_DEPRECATED);
185+
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, \get_class($extension)), E_USER_DEPRECATED);
186186

187187
$extendedTypes = [$extension->getExtendedType()];
188188
}

src/Symfony/Component/Form/DependencyInjection/FormPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private function processFormTypeExtensions(ContainerBuilder $container)
9696

9797
if (isset($tag[0]['extended_type'])) {
9898
if (!method_exists($typeExtensionClass, 'getExtendedTypes')) {
99-
@trigger_error(sprintf('Not implementing the static getExtendedTypes() method in %s when implementing the %s is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.', $typeExtensionClass, FormTypeExtensionInterface::class), E_USER_DEPRECATED);
99+
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, $typeExtensionClass), E_USER_DEPRECATED);
100100
}
101101

102102
$typeExtensions[$tag[0]['extended_type']][] = new Reference($serviceId);

src/Symfony/Component/Form/PreloadedExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(array $types, array $typeExtensions, FormTypeGuesser
3636
foreach ($typeExtensions as $extensions) {
3737
foreach ($extensions as $typeExtension) {
3838
if (!method_exists($typeExtension, 'getExtendedTypes')) {
39-
@trigger_error(sprintf('Not implementing the static getExtendedTypes() method in %s when implementing the %s is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.', \get_class($typeExtension), FormTypeExtensionInterface::class), E_USER_DEPRECATED);
39+
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, \get_class($typeExtension)), E_USER_DEPRECATED);
4040
}
4141
}
4242
}

src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getToken()
4040
public function setToken(TokenInterface $token = null)
4141
{
4242
if (null !== $token && !method_exists($token, 'getRoleNames')) {
43-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
43+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
4444
}
4545

4646
$this->token = $token;

src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct(ExpressionLanguage $expressionLanguage, Authenticati
4444
$authChecker = null;
4545

4646
if (!method_exists($roleHierarchy, 'getReachableRoleNames')) {
47-
@trigger_error(sprintf('Not implementing the getReachableRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($this->roleHierarchy), RoleHierarchyInterface::class), E_USER_DEPRECATED);
47+
@trigger_error(sprintf('Not implementing the "%s::getReachableRoleNames()" method in "%s" is deprecated since Symfony 4.3.', RoleHierarchyInterface::class, \get_class($this->roleHierarchy)), E_USER_DEPRECATED);
4848
}
4949
} elseif (null === $authChecker) {
5050
@trigger_error(sprintf('Argument 3 passed to "%s()" should be an instance of AuthorizationCheckerInterface, not passing it is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
@@ -99,7 +99,7 @@ private function getVariables(TokenInterface $token, $subject)
9999
$roleNames = $token->getRoleNames();
100100
$roles = array_map(function (string $role) { return new Role($role, false); }, $roleNames);
101101
} else {
102-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
102+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
103103

104104
$roles = $token->getRoles(false);
105105
$roleNames = array_map(function (Role $role) { return $role->getRole(); }, $roles);

src/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class RoleHierarchyVoter extends RoleVoter
2929
public function __construct(RoleHierarchyInterface $roleHierarchy, string $prefix = 'ROLE_')
3030
{
3131
if (!method_exists($roleHierarchy, 'getReachableRoleNames')) {
32-
@trigger_error(sprintf('Not implementing the getReachableRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($roleHierarchy), RoleHierarchyInterface::class), E_USER_DEPRECATED);
32+
@trigger_error(sprintf('Not implementing the "%s::getReachableRoleNames()" method in "%s" is deprecated since Symfony 4.3.', RoleHierarchyInterface::class, \get_class($roleHierarchy)), E_USER_DEPRECATED);
3333
}
3434

3535
$this->roleHierarchy = $roleHierarchy;
@@ -46,7 +46,7 @@ protected function extractRoles(TokenInterface $token)
4646
if (method_exists($token, 'getRoleNames')) {
4747
$roles = $token->getRoleNames();
4848
} else {
49-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
49+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
5050

5151
$roles = array_map(function (Role $role) { return $role->getRole(); }, $token->getRoles(false));
5252
}

src/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function extractRoles(TokenInterface $token)
6262
return $token->getRoleNames();
6363
}
6464

65-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
65+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
6666

6767
return array_map(function (Role $role) { return $role->getRole(); }, $token->getRoles(false));
6868
}

src/Symfony/Component/Workflow/EventListener/GuardListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class GuardListener
3838
public function __construct(array $configuration, ExpressionLanguage $expressionLanguage, TokenStorageInterface $tokenStorage, AuthorizationCheckerInterface $authorizationChecker, AuthenticationTrustResolverInterface $trustResolver, RoleHierarchyInterface $roleHierarchy = null, ValidatorInterface $validator = null)
3939
{
4040
if (null !== $roleHierarchy && !method_exists($roleHierarchy, 'getReachableRoleNames')) {
41-
@trigger_error(sprintf('Not implementing the getReachableRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($roleHierarchy), RoleHierarchyInterface::class), E_USER_DEPRECATED);
41+
@trigger_error(sprintf('Not implementing the "%s::getReachableRoleNames()" method in "%s" is deprecated since Symfony 4.3.', RoleHierarchyInterface::class, \get_class($roleHierarchy)), E_USER_DEPRECATED);
4242
}
4343

4444
$this->configuration = $configuration;
@@ -90,7 +90,7 @@ private function getVariables(GuardEvent $event): array
9090
$roleNames = $token->getRoleNames();
9191
$roles = array_map(function (string $role) { return new Role($role, false); }, $roleNames);
9292
} else {
93-
@trigger_error(sprintf('Not implementing the getRoleNames() method in %s which implements %s is deprecated since Symfony 4.3.', \get_class($token), TokenInterface::class), E_USER_DEPRECATED);
93+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
9494

9595
$roles = $token->getRoles(false);
9696
$roleNames = array_map(function (Role $role) { return $role->getRole(); }, $roles);

0 commit comments

Comments
 (0)
0