Skip to content

Commit

Permalink
Merge pull request #679 from Eloar/symfony5.4
Browse files Browse the repository at this point in the history
Symfony 5.4 deprecations adressed
  • Loading branch information
mihaileu authored Dec 21, 2021
2 parents 638ea41 + 74cc7cc commit b2265a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Command/SetupFabricCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected function configure()
;
}

protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
if (defined('AMQP_DEBUG') === false) {
define('AMQP_DEBUG', (bool) $input->getOption('debug'));
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct($name)
$this->name = $name;
}

public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$tree = new TreeBuilder($this->name);
/** @var ArrayNodeDefinition $rootNode */
Expand Down
14 changes: 8 additions & 6 deletions DependencyInjection/OldSoundRabbitMqExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface;
use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand Down Expand Up @@ -71,7 +72,7 @@ public function load(array $configs, ContainerBuilder $container)
}
}

public function getConfiguration(array $config, ContainerBuilder $container)
public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface
{
return new Configuration($this->getAlias());
}
Expand Down Expand Up @@ -531,7 +532,7 @@ protected function loadAnonConsumers()
*
* @return array
*/
private function normalizeArgumentKeys(array $config)
private function normalizeArgumentKeys(array $config): array
{
if (isset($config['arguments'])) {
$arguments = $config['arguments'];
Expand Down Expand Up @@ -559,7 +560,7 @@ private function normalizeArgumentKeys(array $config)
* @param string $arguments
* @return array
*/
private function argumentsStringAsArray($arguments)
private function argumentsStringAsArray($arguments): array
{
$argumentsArray = array();

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

public function getAlias() : string
public function getAlias(): string
{
return 'old_sound_rabbit_mq';
}
Expand All @@ -664,6 +665,7 @@ public function getAlias() : string
*
* @param string $callback
* @param string $name
* @throws \ReflectionException
*/
protected function addDequeuerAwareCall($callback, $name)
{
Expand Down Expand Up @@ -691,7 +693,7 @@ private function injectLogger(Definition $definition)
*
* @return array
*/
protected function getDefaultExchangeOptions()
protected function getDefaultExchangeOptions(): array
{
return array(
'name' => '',
Expand All @@ -706,7 +708,7 @@ protected function getDefaultExchangeOptions()
*
* @return array
*/
protected function getDefaultQueueOptions()
protected function getDefaultQueueOptions(): array
{
return array(
'name' => '',
Expand Down

0 comments on commit b2265a8

Please sign in to comment.