Skip to content

Commit

Permalink
bug #1120 Remove deprecation symfony 6.3 (maxhelias)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.x branch.

Discussion
----------

Remove deprecation symfony 6.3

This is to remove deprecation notices on the Symfony 6.3 CI and adding this type should not break the bundle because all of them are on internal elements

Commits
-------

eade997 Remove deprecation symfony 6.3
  • Loading branch information
chalasr committed Mar 1, 2023
2 parents 0609638 + eade997 commit aa0bf3d
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Command/CheckConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(KeyLoaderInterface $keyLoader, $signatureAlgorithm)
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName(static::$defaultName)
Expand Down
2 changes: 1 addition & 1 deletion Command/GenerateTokenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(JWTTokenManagerInterface $tokenManager, \Traversable
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setName(static::$defaultName)
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/ApiPlatformOpenApiPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class ApiPlatformOpenApiPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('lexik_jwt_authentication.api_platform.openapi.factory') || !$container->hasParameter('security.firewalls')) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class DeprecateLegacyGuardAuthenticatorPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->hasParameter('lexik_jwt_authentication.authenticator_manager_enabled') || !$container->getParameter('lexik_jwt_authentication.authenticator_manager_enabled')) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class WireGenerateTokenCommandPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('lexik_jwt_authentication.generate_token_command') || !$container->hasDefinition('security.context_listener')) {
return;
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/LexikJWTAuthenticationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class LexikJWTAuthenticationExtension extends Extension
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getKey(): string
/**
* {@inheritdoc}
*/
public function addConfiguration(NodeDefinition $node)
public function addConfiguration(NodeDefinition $node): void
{
$node
->children()
Expand Down
6 changes: 3 additions & 3 deletions DependencyInjection/Security/Factory/JWTUserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
*/
final class JWTUserFactory implements UserProviderFactoryInterface
{
public function create(ContainerBuilder $container, $id, $config)
public function create(ContainerBuilder $container, $id, $config): void
{
$container->setDefinition($id, new ChildDefinition('lexik_jwt_authentication.security.jwt_user_provider'))
->replaceArgument(0, $config['class']);
}

public function getKey()
public function getKey(): string
{
return 'lexik_jwt';
}

public function addConfiguration(NodeDefinition $node)
public function addConfiguration(NodeDefinition $node): void
{
$node
->children()
Expand Down
10 changes: 1 addition & 9 deletions LexikJWTAuthenticationBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class LexikJWTAuthenticationBundle extends Bundle
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
public function build(ContainerBuilder $container): void
{
parent::build($container);

Expand Down Expand Up @@ -59,12 +59,4 @@ public function build(ContainerBuilder $container)
$extension->addSecurityListenerFactory(new JWTFactory(false)); // BC 1.x, to be removed in 3.0
}
}

/**
* {@inheritdoc}
*/
public function registerCommands(Application $application)
{
// noop
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BundleExtension extends Extension implements PrependExtensionInterface
/**
* {@inheritdoc}
*/
public function prepend(ContainerBuilder $container)
public function prepend(ContainerBuilder $container): void
{
// Annotation must be disabled since this bundle doesn't use Doctrine
// The framework allows enabling/disabling them only since symfony 3.2 where
Expand All @@ -29,7 +29,7 @@ public function prepend(ContainerBuilder $container)
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
}
}
8 changes: 4 additions & 4 deletions Tests/Functional/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use Lexik\Bundle\JWTAuthenticationBundle\Tests\Functional\Bundle\Bundle;
use Psr\Log\NullLogger;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Bundle\SecurityBundle\SecurityBundle\Security;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel;
Expand Down Expand Up @@ -55,7 +55,7 @@ public function registerBundles(): array
return $bundles;
}

public function getRootDir()
public function getRootDir(): string
{
return __DIR__;
}
Expand All @@ -79,7 +79,7 @@ public function getLogDir(): string
/**
* {@inheritdoc}
*/
public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(__DIR__ . '/config/config_router_utf8.yml');

Expand Down Expand Up @@ -159,7 +159,7 @@ public function getEncoder()
return $this->encoder;
}

protected function build(ContainerBuilder $container)
protected function build(ContainerBuilder $container): void
{
$container->register('logger', NullLogger::class);

Expand Down

0 comments on commit aa0bf3d

Please sign in to comment.