Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecation symfony 6.3 #1120

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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