Skip to content

Commit

Permalink
Fix deprecation versions (lexik#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker authored Jul 2, 2021
1 parent 3a84970 commit f2a92ac
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(bool $internalUse = false)
public function process(ContainerBuilder $container)
{
if (false === $this->internalUse) {
trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '0.13', 'The "%s" class is deprecated.', self::class);
trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '1.0', 'The "%s" class is deprecated.', self::class);
}

$customUserProvider = $container->getParameter('gesdinet_jwt_refresh_token.user_provider');
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/UserCheckerCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(bool $internalUse = false)
public function process(ContainerBuilder $container)
{
if (false === $this->internalUse) {
trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '0.13', 'The "%s" class is deprecated.', self::class);
trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '1.0', 'The "%s" class is deprecated.', self::class);
}

$userCheckerId = $container->getParameter('gesdinet.jwtrefreshtoken.user_checker.id');
Expand Down
10 changes: 5 additions & 5 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ public function getConfigTreeBuilder()
->info('The default update TTL flag for all authenticators.')
->end()
->scalarNode('firewall')
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '0.13'))
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '1.0'))
->defaultValue('api')
->end()
->scalarNode('user_provider')
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '0.13'))
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '1.0'))
->defaultNull()
->end()
->scalarNode('user_identity_field')
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '0.13'))
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '1.0'))
->defaultValue('username')
->end()
->scalarNode('manager_type')
Expand All @@ -66,7 +66,7 @@ public function getConfigTreeBuilder()
->info('Set the object manager to use (default: doctrine.orm.entity_manager)')
->end()
->scalarNode('user_checker')
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '0.13'))
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '1.0'))
->defaultValue('security.user_checker')
->end()
->scalarNode('refresh_token_entity')
Expand All @@ -88,7 +88,7 @@ public function getConfigTreeBuilder()
->info('The default request parameter name containing the refresh token for all authenticators.')
->end()
->booleanNode('doctrine_mappings')
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '0.13'))
->setDeprecated(...$this->getDeprecationParameters('The "%node%" node is deprecated without replacement.', '1.0'))
->info('When true, resolving of Doctrine mapping is done automatically to use either ORM or ODM object manager')
->defaultTrue()
->end()
Expand Down
6 changes: 3 additions & 3 deletions DependencyInjection/GesdinetJWTRefreshTokenExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
class GesdinetJWTRefreshTokenExtension extends Extension
{
private const DEPRECATED_SERVICES = [
'gesdinet.jwtrefreshtoken' => '0.13',
'gesdinet.jwtrefreshtoken.authenticator' => '0.13',
'gesdinet.jwtrefreshtoken.user_provider' => '0.13',
'gesdinet.jwtrefreshtoken' => '1.0',
'gesdinet.jwtrefreshtoken.authenticator' => '1.0',
'gesdinet.jwtrefreshtoken.user_provider' => '1.0',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion Security/Authenticator/RefreshTokenAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use Symfony\Component\HttpFoundation\Response;
use Gesdinet\JWTRefreshTokenBundle\Security\Provider\RefreshTokenProvider;

trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '0.13', 'The "%s" class is deprecated, use the `refresh_jwt` authenticator instead.', RefreshTokenAuthenticator::class);
trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '1.0', 'The "%s" class is deprecated, use the `refresh_jwt` authenticator instead.', RefreshTokenAuthenticator::class);

/**
* Class RefreshTokenAuthenticator.
Expand Down
2 changes: 1 addition & 1 deletion Security/Provider/RefreshTokenProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Gesdinet\JWTRefreshTokenBundle\Model\RefreshTokenManagerInterface;
use Gesdinet\JWTRefreshTokenBundle\Model\RefreshTokenInterface;

trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '0.13', 'The "%s" class is deprecated, configure the user provider for the `refresh_jwt` authenticator instead.', RefreshTokenProvider::class);
trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '1.0', 'The "%s" class is deprecated, configure the user provider for the `refresh_jwt` authenticator instead.', RefreshTokenProvider::class);

/**
* Class RefreshTokenProvider.
Expand Down
2 changes: 1 addition & 1 deletion Service/RefreshToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;

trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '0.13', 'The "%s" class is deprecated, use the `refresh_jwt` authenticator instead.', RefreshToken::class);
trigger_deprecation('gesdinet/jwt-refresh-token-bundle', '1.0', 'The "%s" class is deprecated, use the `refresh_jwt` authenticator instead.', RefreshToken::class);

/**
* Class RefreshToken.
Expand Down

0 comments on commit f2a92ac

Please sign in to comment.