From d41b43ddf01987daa0d326e32f913f7ad35212cf Mon Sep 17 00:00:00 2001 From: Ulrich Lusseau <1121867+metfan@users.noreply.github.com> Date: Tue, 1 Aug 2023 17:06:44 +0200 Subject: [PATCH 1/2] Fix flex plugin for github action --- .github/workflows/unit.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 9d01456..025d423 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -41,7 +41,9 @@ jobs: run: docker restart ${{ job.services.rabbitmq.id }} - name: Install Symfony Flex - run: composer global require --no-progress --no-scripts --no-plugins symfony/flex + run: | + composer global config --no-plugins allow-plugins.symfony/flex true + composer global require --no-progress --no-scripts symfony/flex - name: Install the dependencies env: From cdd0eb25c41568dbf7d6bb0f5b5e2cf182cb9ca9 Mon Sep 17 00:00:00 2001 From: Ulrich Lusseau <1121867+metfan@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:58:02 +0200 Subject: [PATCH 2/2] Apply php-cs-fixer change --- Broker/AmqpLibFactory.php | 9 --------- Broker/BlackholePublisher.php | 3 --- Broker/PeclFactory.php | 9 --------- Command/SwarrotCommand.php | 6 ------ DataCollector/SwarrotDataCollector.php | 5 ----- .../Compiler/ProviderCompilerPass.php | 3 --- DependencyInjection/Configuration.php | 3 --- DependencyInjection/SwarrotExtension.php | 6 ------ Processor/Ack/AckProcessorConfigurator.php | 9 --------- .../Doctrine/ConnectionProcessorConfigurator.php | 14 +------------- .../ObjectManagerProcessorConfigurator.php | 11 +---------- .../ExceptionCatcherProcessorConfigurator.php | 9 --------- .../Insomniac/InsomniacProcessorConfigurator.php | 9 --------- .../InstantRetryProcessorConfigurator.php | 9 --------- .../MaxExecutionTimeProcessorConfigurator.php | 9 --------- .../MaxMessagesProcessorConfigurator.php | 9 --------- .../MemoryLimitProcessorConfigurator.php | 9 --------- Processor/ProcessorConfiguratorExtrasAware.php | 5 ----- Processor/Retry/RetryProcessorConfigurator.php | 9 --------- .../ServicesResetterProcessorConfigurator.php | 9 --------- .../SignalHandlerProcessorConfigurator.php | 9 --------- 21 files changed, 2 insertions(+), 162 deletions(-) diff --git a/Broker/AmqpLibFactory.php b/Broker/AmqpLibFactory.php index fb1e772..c428094 100644 --- a/Broker/AmqpLibFactory.php +++ b/Broker/AmqpLibFactory.php @@ -23,9 +23,6 @@ class AmqpLibFactory implements FactoryInterface /** @var array */ protected $messagePublishers = []; - /** - * {@inheritdoc} - */ public function addConnection(string $name, array $connection): void { if (!empty($connection['url'])) { @@ -36,9 +33,6 @@ public function addConnection(string $name, array $connection): void $this->connections[$name] = $connection; } - /** - * {@inheritdoc} - */ public function getMessageProvider(string $name, string $connection): MessageProviderInterface { if (!isset($this->messageProviders[$connection][$name])) { @@ -54,9 +48,6 @@ public function getMessageProvider(string $name, string $connection): MessagePro return $this->messageProviders[$connection][$name]; } - /** - * {@inheritdoc} - */ public function getMessagePublisher(string $name, string $connection): MessagePublisherInterface { if (!isset($this->messagePublishers[$connection][$name])) { diff --git a/Broker/BlackholePublisher.php b/Broker/BlackholePublisher.php index 95ac139..3bfb9f2 100644 --- a/Broker/BlackholePublisher.php +++ b/Broker/BlackholePublisher.php @@ -6,9 +6,6 @@ class BlackholePublisher extends Publisher { - /** - * {@inheritdoc} - */ public function publish(string $messageType, Message $message, array $overridenConfig = []): void { } diff --git a/Broker/PeclFactory.php b/Broker/PeclFactory.php index 98ed69b..34b75a2 100644 --- a/Broker/PeclFactory.php +++ b/Broker/PeclFactory.php @@ -40,9 +40,6 @@ public function __construct(LoggerInterface $logger = null, bool $publisherConfi $this->timeout = $timeout; } - /** - * {@inheritdoc} - */ public function addConnection(string $name, array $connection): void { if (!empty($connection['url'])) { @@ -53,9 +50,6 @@ public function addConnection(string $name, array $connection): void $this->connections[$name] = $connection; } - /** - * {@inheritdoc} - */ public function getMessageProvider(string $name, string $connection): MessageProviderInterface { if (!isset($this->messageProviders[$connection][$name])) { @@ -71,9 +65,6 @@ public function getMessageProvider(string $name, string $connection): MessagePro return $this->messageProviders[$connection][$name]; } - /** - * {@inheritdoc} - */ public function getMessagePublisher(string $name, string $connection): MessagePublisherInterface { if (!isset($this->messagePublishers[$connection][$name])) { diff --git a/Command/SwarrotCommand.php b/Command/SwarrotCommand.php index 2115316..3159c11 100644 --- a/Command/SwarrotCommand.php +++ b/Command/SwarrotCommand.php @@ -58,9 +58,6 @@ public function __construct( parent::__construct(); } - /** - * {@inheritdoc} - */ protected function configure(): void { $defaultPollInterval = isset($this->extras['poll_interval']) ? $this->extras['poll_interval'] : 500000; @@ -98,9 +95,6 @@ protected function configure(): void } } - /** - * {@inheritdoc} - */ protected function execute(InputInterface $input, OutputInterface $output): int { $options = $this->getOptions($input); diff --git a/DataCollector/SwarrotDataCollector.php b/DataCollector/SwarrotDataCollector.php index 9aee356..e3ef48f 100644 --- a/DataCollector/SwarrotDataCollector.php +++ b/DataCollector/SwarrotDataCollector.php @@ -11,8 +11,6 @@ class SwarrotDataCollector extends DataCollector { /** - * {@inheritdoc} - * * @param \Throwable|\Exception $exception */ public function collect(Request $request, Response $response, \Throwable $exception = null): void @@ -43,9 +41,6 @@ public function getNbMessages(): int return count($this->data); } - /** - * {@inheritdoc} - */ public function getName(): string { return 'swarrot'; diff --git a/DependencyInjection/Compiler/ProviderCompilerPass.php b/DependencyInjection/Compiler/ProviderCompilerPass.php index f70d7f6..955fa42 100644 --- a/DependencyInjection/Compiler/ProviderCompilerPass.php +++ b/DependencyInjection/Compiler/ProviderCompilerPass.php @@ -8,9 +8,6 @@ class ProviderCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if ($container->has('swarrot.factory.default') || !$container->hasParameter('swarrot.provider_config')) { diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index f0b38ad..80e63d7 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -26,9 +26,6 @@ public function __construct(bool $debug) $this->debug = $debug; } - /** - * {@inheritdoc} - */ public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('swarrot'); diff --git a/DependencyInjection/SwarrotExtension.php b/DependencyInjection/SwarrotExtension.php index 7e70d99..69e095f 100644 --- a/DependencyInjection/SwarrotExtension.php +++ b/DependencyInjection/SwarrotExtension.php @@ -14,9 +14,6 @@ */ class SwarrotExtension extends Extension { - /** - * {@inheritdoc} - */ public function load(array $configs, ContainerBuilder $container): void { $config = $this->processConfiguration($this->getConfiguration($configs, $container), $configs); @@ -66,9 +63,6 @@ public function load(array $configs, ContainerBuilder $container): void } } - /** - * {@inheritdoc} - */ public function getConfiguration(array $configs, ContainerBuilder $container): Configuration { return new Configuration((bool) $container->getParameter('kernel.debug')); diff --git a/Processor/Ack/AckProcessorConfigurator.php b/Processor/Ack/AckProcessorConfigurator.php index 22fabf2..fada036 100644 --- a/Processor/Ack/AckProcessorConfigurator.php +++ b/Processor/Ack/AckProcessorConfigurator.php @@ -29,9 +29,6 @@ public function __construct(string $processorClass, FactoryInterface $factory, L $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -41,9 +38,6 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return [ @@ -52,9 +46,6 @@ public function getCommandOptions(): array ]; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { $this->enabled = !$input->getOption('no-ack'); diff --git a/Processor/Doctrine/ConnectionProcessorConfigurator.php b/Processor/Doctrine/ConnectionProcessorConfigurator.php index cbb836b..6e79ddd 100644 --- a/Processor/Doctrine/ConnectionProcessorConfigurator.php +++ b/Processor/Doctrine/ConnectionProcessorConfigurator.php @@ -14,21 +14,15 @@ class ConnectionProcessorConfigurator implements ProcessorConfiguratorInterface /** @var string */ private $processorClass; - /** @var mixed */ + private $connections; - /** - * @param mixed $connections - */ public function __construct(string $processorClass, $connections) { $this->processorClass = $processorClass; $this->connections = $connections; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -37,17 +31,11 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return []; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { return $this->getExtras(); diff --git a/Processor/Doctrine/ObjectManagerProcessorConfigurator.php b/Processor/Doctrine/ObjectManagerProcessorConfigurator.php index 9703d35..d03a204 100644 --- a/Processor/Doctrine/ObjectManagerProcessorConfigurator.php +++ b/Processor/Doctrine/ObjectManagerProcessorConfigurator.php @@ -16,7 +16,7 @@ class ObjectManagerProcessorConfigurator implements ProcessorConfiguratorInterfa /** @var string */ private $processorClass; - /** @var mixed */ + private $managerRegistry; public function __construct(string $processorClass, ManagerRegistry $managerRegistry) @@ -25,9 +25,6 @@ public function __construct(string $processorClass, ManagerRegistry $managerRegi $this->managerRegistry = $managerRegistry; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -36,9 +33,6 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return [ @@ -46,9 +40,6 @@ public function getCommandOptions(): array ]; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { $this->enabled = !$input->getOption('no-reset'); diff --git a/Processor/ExceptionCatcher/ExceptionCatcherProcessorConfigurator.php b/Processor/ExceptionCatcher/ExceptionCatcherProcessorConfigurator.php index c30a8a7..1b19fde 100644 --- a/Processor/ExceptionCatcher/ExceptionCatcherProcessorConfigurator.php +++ b/Processor/ExceptionCatcher/ExceptionCatcherProcessorConfigurator.php @@ -25,9 +25,6 @@ public function __construct(string $processorClass, LoggerInterface $logger) $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -36,9 +33,6 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return [ @@ -46,9 +40,6 @@ public function getCommandOptions(): array ]; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { $this->enabled = !$input->getOption('no-catch'); diff --git a/Processor/Insomniac/InsomniacProcessorConfigurator.php b/Processor/Insomniac/InsomniacProcessorConfigurator.php index 60d6e20..b816d3a 100644 --- a/Processor/Insomniac/InsomniacProcessorConfigurator.php +++ b/Processor/Insomniac/InsomniacProcessorConfigurator.php @@ -21,9 +21,6 @@ public function __construct(LoggerInterface $logger) $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -32,17 +29,11 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return []; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { return $this->getExtras(); diff --git a/Processor/InstantRetry/InstantRetryProcessorConfigurator.php b/Processor/InstantRetry/InstantRetryProcessorConfigurator.php index 55e744d..574b191 100644 --- a/Processor/InstantRetry/InstantRetryProcessorConfigurator.php +++ b/Processor/InstantRetry/InstantRetryProcessorConfigurator.php @@ -21,9 +21,6 @@ public function __construct(LoggerInterface $logger) $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -32,17 +29,11 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return []; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { return $this->getExtras(); diff --git a/Processor/MaxExecutionTime/MaxExecutionTimeProcessorConfigurator.php b/Processor/MaxExecutionTime/MaxExecutionTimeProcessorConfigurator.php index 1244fb7..96aa57f 100644 --- a/Processor/MaxExecutionTime/MaxExecutionTimeProcessorConfigurator.php +++ b/Processor/MaxExecutionTime/MaxExecutionTimeProcessorConfigurator.php @@ -25,9 +25,6 @@ public function __construct(string $processorClass, LoggerInterface $logger) $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -36,9 +33,6 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return [ @@ -52,9 +46,6 @@ public function getCommandOptions(): array ]; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { return [ diff --git a/Processor/MaxMessages/MaxMessagesProcessorConfigurator.php b/Processor/MaxMessages/MaxMessagesProcessorConfigurator.php index 27be14a..8a9cba2 100644 --- a/Processor/MaxMessages/MaxMessagesProcessorConfigurator.php +++ b/Processor/MaxMessages/MaxMessagesProcessorConfigurator.php @@ -25,9 +25,6 @@ public function __construct(string $processorClass, LoggerInterface $logger) $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -36,9 +33,6 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return [ @@ -52,9 +46,6 @@ public function getCommandOptions(): array ]; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { return [ diff --git a/Processor/MemoryLimit/MemoryLimitProcessorConfigurator.php b/Processor/MemoryLimit/MemoryLimitProcessorConfigurator.php index 7898469..9f6c576 100644 --- a/Processor/MemoryLimit/MemoryLimitProcessorConfigurator.php +++ b/Processor/MemoryLimit/MemoryLimitProcessorConfigurator.php @@ -21,9 +21,6 @@ public function __construct(LoggerInterface $logger) $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -32,17 +29,11 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return []; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { return $this->getExtras(); diff --git a/Processor/ProcessorConfiguratorExtrasAware.php b/Processor/ProcessorConfiguratorExtrasAware.php index 9b7b9b9..f06f511 100644 --- a/Processor/ProcessorConfiguratorExtrasAware.php +++ b/Processor/ProcessorConfiguratorExtrasAware.php @@ -17,11 +17,6 @@ public function getExtras(): array return $this->extras; } - /** - * @param mixed $default - * - * @return mixed - */ protected function getExtra(string $name, $default = null) { return isset($this->extras[$name]) ? $this->extras[$name] : $default; diff --git a/Processor/Retry/RetryProcessorConfigurator.php b/Processor/Retry/RetryProcessorConfigurator.php index 0d58bc6..402671f 100644 --- a/Processor/Retry/RetryProcessorConfigurator.php +++ b/Processor/Retry/RetryProcessorConfigurator.php @@ -29,9 +29,6 @@ public function __construct(string $processorClass, FactoryInterface $factory, L $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { $exchange = $this->getExtra('retry_exchange', 'retry'); @@ -43,9 +40,6 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return [ @@ -60,9 +54,6 @@ public function getCommandOptions(): array ]; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { $this->enabled = !$input->getOption('no-retry'); diff --git a/Processor/ServicesResetter/ServicesResetterProcessorConfigurator.php b/Processor/ServicesResetter/ServicesResetterProcessorConfigurator.php index e21921d..63e58d9 100644 --- a/Processor/ServicesResetter/ServicesResetterProcessorConfigurator.php +++ b/Processor/ServicesResetter/ServicesResetterProcessorConfigurator.php @@ -30,9 +30,6 @@ public function __construct(string $processorClass, ResetInterface $servicesRese $this->servicesResetter = $servicesResetter; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -41,9 +38,6 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return [ @@ -51,9 +45,6 @@ public function getCommandOptions(): array ]; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { $this->enabled = !$input->getOption('no-reset'); diff --git a/Processor/SignalHandler/SignalHandlerProcessorConfigurator.php b/Processor/SignalHandler/SignalHandlerProcessorConfigurator.php index db015fc..66de290 100644 --- a/Processor/SignalHandler/SignalHandlerProcessorConfigurator.php +++ b/Processor/SignalHandler/SignalHandlerProcessorConfigurator.php @@ -24,9 +24,6 @@ public function __construct(string $processorClass, LoggerInterface $logger) $this->logger = $logger; } - /** - * {@inheritdoc} - */ public function getProcessorArguments(array $options): array { return [ @@ -35,17 +32,11 @@ public function getProcessorArguments(array $options): array ]; } - /** - * {@inheritdoc} - */ public function getCommandOptions(): array { return []; } - /** - * {@inheritdoc} - */ public function resolveOptions(InputInterface $input): array { return $this->getExtras();