diff --git a/composer.json b/composer.json index e17ab6570..1880bd0dd 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/pkg/enqueue-bundle/Profiler/MessageQueueCollector.php b/pkg/enqueue-bundle/Profiler/MessageQueueCollector.php index 7fc6699c5..3c484a7d1 100644 --- a/pkg/enqueue-bundle/Profiler/MessageQueueCollector.php +++ b/pkg/enqueue-bundle/Profiler/MessageQueueCollector.php @@ -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); } diff --git a/pkg/enqueue/Doctrine/DoctrineSchemaCompilerPass.php b/pkg/enqueue/Doctrine/DoctrineSchemaCompilerPass.php index 25016a761..0eb378470 100644 --- a/pkg/enqueue/Doctrine/DoctrineSchemaCompilerPass.php +++ b/pkg/enqueue/Doctrine/DoctrineSchemaCompilerPass.php @@ -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; diff --git a/pkg/enqueue/Symfony/Client/ConsumeCommand.php b/pkg/enqueue/Symfony/Client/ConsumeCommand.php index 39af6d592..cdf8a8c9c 100644 --- a/pkg/enqueue/Symfony/Client/ConsumeCommand.php +++ b/pkg/enqueue/Symfony/Client/ConsumeCommand.php @@ -20,7 +20,7 @@ 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; @@ -28,7 +28,7 @@ class ConsumeCommand extends Command use QueueConsumerOptionsCommandTrait; use SetupBrokerExtensionCommandTrait; - protected static $defaultName = 'enqueue:consume'; + private const COMMAND_NAME = 'enqueue:consume'; /** * @var ContainerInterface @@ -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 diff --git a/pkg/enqueue/Symfony/Client/ProduceCommand.php b/pkg/enqueue/Symfony/Client/ProduceCommand.php index 6064f82e1..e5215cd6f 100644 --- a/pkg/enqueue/Symfony/Client/ProduceCommand.php +++ b/pkg/enqueue/Symfony/Client/ProduceCommand.php @@ -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 @@ -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 diff --git a/pkg/enqueue/Symfony/Client/RoutesCommand.php b/pkg/enqueue/Symfony/Client/RoutesCommand.php index 59a4a4d98..542633933 100644 --- a/pkg/enqueue/Symfony/Client/RoutesCommand.php +++ b/pkg/enqueue/Symfony/Client/RoutesCommand.php @@ -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 */ @@ -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 diff --git a/pkg/enqueue/Symfony/Client/SetupBrokerCommand.php b/pkg/enqueue/Symfony/Client/SetupBrokerCommand.php index 68aebb582..b23420715 100644 --- a/pkg/enqueue/Symfony/Client/SetupBrokerCommand.php +++ b/pkg/enqueue/Symfony/Client/SetupBrokerCommand.php @@ -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 @@ -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 diff --git a/pkg/enqueue/Symfony/Consumption/ConfigurableConsumeCommand.php b/pkg/enqueue/Symfony/Consumption/ConfigurableConsumeCommand.php index 234eb0497..3dc648799 100644 --- a/pkg/enqueue/Symfony/Consumption/ConfigurableConsumeCommand.php +++ b/pkg/enqueue/Symfony/Consumption/ConfigurableConsumeCommand.php @@ -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 @@ -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 diff --git a/pkg/enqueue/Symfony/Consumption/ConsumeCommand.php b/pkg/enqueue/Symfony/Consumption/ConsumeCommand.php index 870cc5f60..008982ff3 100644 --- a/pkg/enqueue/Symfony/Consumption/ConsumeCommand.php +++ b/pkg/enqueue/Symfony/Consumption/ConsumeCommand.php @@ -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 @@ -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