Sync "not implementing the method" deprecations messages
This commit is contained in:
parent
2f79ccdc74
commit
f6fae1c361
@ -364,7 +364,7 @@ abstract class NodeDefinition implements NodeParentInterface
|
||||
$child->setPathSeparator($separator);
|
||||
}
|
||||
} else {
|
||||
@trigger_error('Passing a ParentNodeDefinitionInterface without getChildNodeDefinitions() is deprecated since Symfony 4.1.', E_USER_DEPRECATED);
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ abstract class AbstractExtension implements FormExtensionInterface
|
||||
$extendedTypes[] = $extendedType;
|
||||
}
|
||||
} else {
|
||||
@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);
|
||||
@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);
|
||||
|
||||
$extendedTypes = [$extension->getExtendedType()];
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ class FormPass implements CompilerPassInterface
|
||||
|
||||
if (isset($tag[0]['extended_type'])) {
|
||||
if (!method_exists($typeExtensionClass, 'getExtendedTypes')) {
|
||||
@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);
|
||||
@trigger_error(sprintf('Not implementing the "%s::getExtendedTypes()" method in "%s" is deprecated since Symfony 4.2.', FormTypeExtensionInterface::class, $typeExtensionClass), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$typeExtensions[$tag[0]['extended_type']][] = new Reference($serviceId);
|
||||
|
@ -36,7 +36,7 @@ class PreloadedExtension implements FormExtensionInterface
|
||||
foreach ($typeExtensions as $extensions) {
|
||||
foreach ($extensions as $typeExtension) {
|
||||
if (!method_exists($typeExtension, 'getExtendedTypes')) {
|
||||
@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);
|
||||
@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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class TokenStorage implements TokenStorageInterface, ResetInterface
|
||||
public function setToken(TokenInterface $token = null)
|
||||
{
|
||||
if (null !== $token && !method_exists($token, 'getRoleNames')) {
|
||||
@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);
|
||||
@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);
|
||||
}
|
||||
|
||||
$this->token = $token;
|
||||
|
@ -44,7 +44,7 @@ class ExpressionVoter implements VoterInterface
|
||||
$authChecker = null;
|
||||
|
||||
if (!method_exists($roleHierarchy, 'getReachableRoleNames')) {
|
||||
@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);
|
||||
@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);
|
||||
}
|
||||
} elseif (null === $authChecker) {
|
||||
@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 @@ class ExpressionVoter implements VoterInterface
|
||||
$roleNames = $token->getRoleNames();
|
||||
$roles = array_map(function (string $role) { return new Role($role, false); }, $roleNames);
|
||||
} else {
|
||||
@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);
|
||||
@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);
|
||||
|
||||
$roles = $token->getRoles(false);
|
||||
$roleNames = array_map(function (Role $role) { return $role->getRole(); }, $roles);
|
||||
|
@ -29,7 +29,7 @@ class RoleHierarchyVoter extends RoleVoter
|
||||
public function __construct(RoleHierarchyInterface $roleHierarchy, string $prefix = 'ROLE_')
|
||||
{
|
||||
if (!method_exists($roleHierarchy, 'getReachableRoleNames')) {
|
||||
@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);
|
||||
@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);
|
||||
}
|
||||
|
||||
$this->roleHierarchy = $roleHierarchy;
|
||||
@ -46,7 +46,7 @@ class RoleHierarchyVoter extends RoleVoter
|
||||
if (method_exists($token, 'getRoleNames')) {
|
||||
$roles = $token->getRoleNames();
|
||||
} else {
|
||||
@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);
|
||||
@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);
|
||||
|
||||
$roles = array_map(function (Role $role) { return $role->getRole(); }, $token->getRoles(false));
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class RoleVoter implements VoterInterface
|
||||
return $token->getRoleNames();
|
||||
}
|
||||
|
||||
@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);
|
||||
@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);
|
||||
|
||||
return array_map(function (Role $role) { return $role->getRole(); }, $token->getRoles(false));
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class GuardListener
|
||||
public function __construct(array $configuration, ExpressionLanguage $expressionLanguage, TokenStorageInterface $tokenStorage, AuthorizationCheckerInterface $authorizationChecker, AuthenticationTrustResolverInterface $trustResolver, RoleHierarchyInterface $roleHierarchy = null, ValidatorInterface $validator = null)
|
||||
{
|
||||
if (null !== $roleHierarchy && !method_exists($roleHierarchy, 'getReachableRoleNames')) {
|
||||
@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);
|
||||
@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);
|
||||
}
|
||||
|
||||
$this->configuration = $configuration;
|
||||
@ -90,7 +90,7 @@ class GuardListener
|
||||
$roleNames = $token->getRoleNames();
|
||||
$roles = array_map(function (string $role) { return new Role($role, false); }, $roleNames);
|
||||
} else {
|
||||
@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);
|
||||
@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);
|
||||
|
||||
$roles = $token->getRoles(false);
|
||||
$roleNames = array_map(function (Role $role) { return $role->getRole(); }, $roles);
|
||||
|
Reference in New Issue
Block a user