Skip to content

Commit b2265a8

Browse files
authored
Merge pull request #679 from Eloar/symfony5.4
Symfony 5.4 deprecations adressed
2 parents 638ea41 + 74cc7cc commit b2265a8

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

Command/SetupFabricCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protected function configure()
1818
;
1919
}
2020

21-
protected function execute(InputInterface $input, OutputInterface $output)
21+
protected function execute(InputInterface $input, OutputInterface $output): int
2222
{
2323
if (defined('AMQP_DEBUG') === false) {
2424
define('AMQP_DEBUG', (bool) $input->getOption('debug'));

DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct($name)
2929
$this->name = $name;
3030
}
3131

32-
public function getConfigTreeBuilder()
32+
public function getConfigTreeBuilder(): TreeBuilder
3333
{
3434
$tree = new TreeBuilder($this->name);
3535
/** @var ArrayNodeDefinition $rootNode */

DependencyInjection/OldSoundRabbitMqExtension.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface;
66
use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface;
7+
use Symfony\Component\Config\Definition\ConfigurationInterface;
78
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
89
use Symfony\Component\Config\FileLocator;
910
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -71,7 +72,7 @@ public function load(array $configs, ContainerBuilder $container)
7172
}
7273
}
7374

74-
public function getConfiguration(array $config, ContainerBuilder $container)
75+
public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface
7576
{
7677
return new Configuration($this->getAlias());
7778
}
@@ -531,7 +532,7 @@ protected function loadAnonConsumers()
531532
*
532533
* @return array
533534
*/
534-
private function normalizeArgumentKeys(array $config)
535+
private function normalizeArgumentKeys(array $config): array
535536
{
536537
if (isset($config['arguments'])) {
537538
$arguments = $config['arguments'];
@@ -559,7 +560,7 @@ private function normalizeArgumentKeys(array $config)
559560
* @param string $arguments
560561
* @return array
561562
*/
562-
private function argumentsStringAsArray($arguments)
563+
private function argumentsStringAsArray($arguments): array
563564
{
564565
$argumentsArray = array();
565566

@@ -654,7 +655,7 @@ protected function injectConnection(Definition $definition, $connectionName)
654655
$definition->addArgument(new Reference(sprintf('old_sound_rabbit_mq.connection.%s', $connectionName)));
655656
}
656657

657-
public function getAlias() : string
658+
public function getAlias(): string
658659
{
659660
return 'old_sound_rabbit_mq';
660661
}
@@ -664,6 +665,7 @@ public function getAlias() : string
664665
*
665666
* @param string $callback
666667
* @param string $name
668+
* @throws \ReflectionException
667669
*/
668670
protected function addDequeuerAwareCall($callback, $name)
669671
{
@@ -691,7 +693,7 @@ private function injectLogger(Definition $definition)
691693
*
692694
* @return array
693695
*/
694-
protected function getDefaultExchangeOptions()
696+
protected function getDefaultExchangeOptions(): array
695697
{
696698
return array(
697699
'name' => '',
@@ -706,7 +708,7 @@ protected function getDefaultExchangeOptions()
706708
*
707709
* @return array
708710
*/
709-
protected function getDefaultQueueOptions()
711+
protected function getDefaultQueueOptions(): array
710712
{
711713
return array(
712714
'name' => '',

0 commit comments

Comments
 (0)