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

fixed symfony 6.1 deprecation notices #1350

Closed
wants to merge 6 commits into from
Closed
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
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"kwn/php-rdkafka-stubs": "^2.0.3",
"friendsofphp/php-cs-fixer": "^3.4",
"dms/phpunit-arraysubset-asserts": "^0.2.1",
"phpspec/prophecy-phpunit": "^2.0"
"phpspec/prophecy-phpunit": "^2.0",
"symfony/http-foundation": "^5.4|^6.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 1 addition & 2 deletions pkg/enqueue-bundle/Profiler/MessageQueueCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Throwable;

class MessageQueueCollector extends AbstractMessageQueueCollector
{
public function collect(Request $request, Response $response, Throwable $exception = null)
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
{
$this->collectInternal($request, $response);
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/enqueue/Doctrine/DoctrineSchemaCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class DoctrineSchemaCompilerPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (false === $container->hasDefinition('doctrine')) {
return;
Expand Down
6 changes: 3 additions & 3 deletions pkg/enqueue/Symfony/Client/ConsumeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand('enqueue:consume')]
#[AsCommand(self::COMMAND_NAME)]
class ConsumeCommand extends Command
{
use ChooseLoggerCommandTrait;
use LimitsExtensionsCommandTrait;
use QueueConsumerOptionsCommandTrait;
use SetupBrokerExtensionCommandTrait;

protected static $defaultName = 'enqueue:consume';
private const COMMAND_NAME = 'enqueue:consume';

/**
* @var ContainerInterface
Expand Down Expand Up @@ -68,7 +68,7 @@ public function __construct(
$this->driverIdPattern = $driverIdPattern;
$this->processorIdPattern = $processorIdPatter;

parent::__construct(self::$defaultName);
parent::__construct(self::COMMAND_NAME);
}

protected function configure(): void
Expand Down
6 changes: 3 additions & 3 deletions pkg/enqueue/Symfony/Client/ProduceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand('enqueue:produce')]
#[AsCommand(self::COMMAND_NAME)]
class ProduceCommand extends Command
{
protected static $defaultName = 'enqueue:produce';
private const COMMAND_NAME = 'enqueue:produce';

/**
* @var ContainerInterface
Expand All @@ -39,7 +39,7 @@ public function __construct(ContainerInterface $container, string $defaultClient
$this->defaultClient = $defaultClient;
$this->producerIdPattern = $producerIdPattern;

parent::__construct(static::$defaultName);
parent::__construct(self::COMMAND_NAME);
}

protected function configure(): void
Expand Down
7 changes: 3 additions & 4 deletions pkg/enqueue/Symfony/Client/RoutesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand('enqueue:routes')]
#[AsCommand(self::COMMAND_NAME)]
class RoutesCommand extends Command
{
protected static $defaultName = 'enqueue:routes';

private const COMMAND_NAME = 'enqueue:routes';
/**
* @var ContainerInterface
*/
Expand All @@ -45,7 +44,7 @@ public function __construct(ContainerInterface $container, string $defaultClient
$this->defaultClient = $defaultClient;
$this->driverIdPatter = $driverIdPatter;

parent::__construct(static::$defaultName);
parent::__construct(self::COMMAND_NAME);
}

protected function configure(): void
Expand Down
6 changes: 3 additions & 3 deletions pkg/enqueue/Symfony/Client/SetupBrokerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
use Symfony\Component\Console\Logger\ConsoleLogger;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand('enqueue:setup-broker')]
#[AsCommand(self::COMMAND_NAME)]
class SetupBrokerCommand extends Command
{
protected static $defaultName = 'enqueue:setup-broker';
private const COMMAND_NAME = 'enqueue:setup-broker';

/**
* @var ContainerInterface
Expand All @@ -38,7 +38,7 @@ public function __construct(ContainerInterface $container, string $defaultClient
$this->defaultClient = $defaultClient;
$this->driverIdPattern = $driverIdPattern;

parent::__construct(static::$defaultName);
parent::__construct(self::COMMAND_NAME);
}

protected function configure(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand('enqueue:transport:consume')]
#[AsCommand(self::COMMAND_NAME)]
class ConfigurableConsumeCommand extends Command
{
use ChooseLoggerCommandTrait;
use LimitsExtensionsCommandTrait;
use QueueConsumerOptionsCommandTrait;

protected static $defaultName = 'enqueue:transport:consume';
private const COMMAND_NAME = 'enqueue:transport:consume';

/**
* @var ContainerInterface
Expand Down Expand Up @@ -55,7 +55,7 @@ public function __construct(
$this->queueConsumerIdPattern = $queueConsumerIdPattern;
$this->processorRegistryIdPattern = $processorRegistryIdPattern;

parent::__construct(static::$defaultName);
parent::__construct(self::COMMAND_NAME);
}

protected function configure(): void
Expand Down
6 changes: 3 additions & 3 deletions pkg/enqueue/Symfony/Consumption/ConsumeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

#[AsCommand('enqueue:transport:consume')]
#[AsCommand(self::COMMAND_NAME)]
class ConsumeCommand extends Command
{
use ChooseLoggerCommandTrait;
use LimitsExtensionsCommandTrait;
use QueueConsumerOptionsCommandTrait;

protected static $defaultName = 'enqueue:transport:consume';
private const COMMAND_NAME = 'enqueue:transport:consume';

/**
* @var ContainerInterface
Expand All @@ -43,7 +43,7 @@ public function __construct(ContainerInterface $container, string $defaultTransp
$this->defaultTransport = $defaultTransport;
$this->queueConsumerIdPattern = $queueConsumerIdPattern;

parent::__construct(static::$defaultName);
parent::__construct(self::COMMAND_NAME);
}

protected function configure(): void
Expand Down