Skip to content

Commit

Permalink
symfony/dependency-injection: 6.3 deprecation notes (#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yalpa authored Oct 31, 2023
1 parent 036311c commit 3a082c1
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Command/AnonConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class AnonConsumerCommand extends BaseConsumerCommand
{
protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down
4 changes: 2 additions & 2 deletions Command/BaseConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function restartConsumer()
// TODO: Implement restarting of consumer
}

protected function configure()
protected function configure(): void
{
parent::configure();

Expand All @@ -51,7 +51,7 @@ protected function configure()
;
}

protected function initialize(InputInterface $input, OutputInterface $output)
protected function initialize(InputInterface $input, OutputInterface $output): void
{
$this->amount = (int)$input->getOption('messages');
if (0 > $this->amount) {
Expand Down
5 changes: 1 addition & 4 deletions Command/BaseRabbitMqCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ abstract class BaseRabbitMqCommand extends Command implements ContainerAwareInte
*/
protected $container;

/**
* {@inheritDoc}
*/
public function setContainer(ContainerInterface $container = null)
public function setContainer(ContainerInterface $container = null): void
{
$this->container = $container;
}
Expand Down
2 changes: 1 addition & 1 deletion Command/BatchConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function stopConsumer()
}
}

protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down
2 changes: 1 addition & 1 deletion Command/ConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class ConsumerCommand extends BaseConsumerCommand
{
protected function configure()
protected function configure(): void
{
parent::configure();
$this->setDescription('Executes a consumer');
Expand Down
4 changes: 2 additions & 2 deletions Command/DeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class DeleteCommand extends ConsumerCommand
{
protected function configure()
protected function configure(): void
{
$this->addArgument('name', InputArgument::REQUIRED, 'Consumer Name')
->setDescription('Delete a consumer\'s queue')
Expand All @@ -22,7 +22,7 @@ protected function configure()
$this->setName('rabbitmq:delete');
}

protected function initialize(InputInterface $input, OutputInterface $output)
protected function initialize(InputInterface $input, OutputInterface $output): void
{
// nothing to initialize here as BaseConsumerCommand initializes on option that is not available here
}
Expand Down
2 changes: 1 addition & 1 deletion Command/DynamicConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class DynamicConsumerCommand extends BaseConsumerCommand
{
protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down
2 changes: 1 addition & 1 deletion Command/MultipleConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class MultipleConsumerCommand extends BaseConsumerCommand
{
protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down
4 changes: 2 additions & 2 deletions Command/PurgeConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class PurgeConsumerCommand extends ConsumerCommand
{
protected function configure()
protected function configure(): void
{
$this->addArgument('name', InputArgument::REQUIRED, 'Consumer Name')
->setDescription('Purge a consumer\'s queue')
Expand All @@ -22,7 +22,7 @@ protected function configure()
$this->setName('rabbitmq:purge');
}

protected function initialize(InputInterface $input, OutputInterface $output)
protected function initialize(InputInterface $input, OutputInterface $output): void
{
// nothing to initialize here as BaseConsumerCommand initializes on option that is not available here
}
Expand Down
2 changes: 1 addition & 1 deletion Command/RpcServerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class RpcServerCommand extends BaseRabbitMqCommand
{
protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down
2 changes: 1 addition & 1 deletion Command/SetupFabricCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class SetupFabricCommand extends BaseRabbitMqCommand
{
protected function configure()
protected function configure(): void
{
$this
->setName('rabbitmq:setup-fabric')
Expand Down
2 changes: 1 addition & 1 deletion Command/StdInProducerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class StdInProducerCommand extends BaseRabbitMqCommand
public const FORMAT_PHP = 'php';
public const FORMAT_RAW = 'raw';

protected function configure()
protected function configure(): void
{
parent::configure();

Expand Down
5 changes: 1 addition & 4 deletions DependencyInjection/Compiler/InjectEventDispatcherPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ class InjectEventDispatcherPass implements CompilerPassInterface
{
public const EVENT_DISPATCHER_SERVICE_ID = 'event_dispatcher';

/**
* @inheritDoc
*/
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
if (!$container->has(self::EVENT_DISPATCHER_SERVICE_ID)) {
return;
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/RegisterPartsPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class RegisterPartsPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
$services = $container->findTaggedServiceIds('old_sound_rabbit_mq.base_amqp');
$container->setParameter('old_sound_rabbit_mq.base_amqp', array_keys($services));
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/OldSoundRabbitMqExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class OldSoundRabbitMqExtension extends Extension

private $config = [];

public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
$this->container = $container;

Expand Down

0 comments on commit 3a082c1

Please sign in to comment.