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
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit f1125d9

Browse filesBrowse 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 symfony/symfony#32747 (comment) Useful for consistency and for future reference for similar messages. Commits ------- f6fae1c361 Sync "not implementing the method" deprecations messages
2 parents 4c835c1 + 6b7ca47 commit f1125d9
Copy full SHA for f1125d9

File tree

Expand file treeCollapse file tree

4 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+6
-6
lines changed

‎Core/Authentication/Token/Storage/TokenStorage.php

Copy file name to clipboardExpand all lines: Core/Authentication/Token/Storage/TokenStorage.php
+1-1Lines 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;

‎Core/Authorization/Voter/ExpressionVoter.php

Copy file name to clipboardExpand all lines: Core/Authorization/Voter/ExpressionVoter.php
+2-2Lines 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);

‎Core/Authorization/Voter/RoleHierarchyVoter.php

Copy file name to clipboardExpand all lines: Core/Authorization/Voter/RoleHierarchyVoter.php
+2-2Lines 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
}

‎Core/Authorization/Voter/RoleVoter.php

Copy file name to clipboardExpand all lines: Core/Authorization/Voter/RoleVoter.php
+1-1Lines 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
}

0 commit comments

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