From ccf1145d1c2a5e0f0a6ea2c225741b9364c7b3d4 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Mon, 11 Apr 2022 09:21:13 +0200 Subject: [PATCH] Return `int` from `execute()` methods in Commands to fix a Symfony 4.4 deprecation notice (#3) --- src/Command/ListSynchronizersCommand.php | 4 +++- src/Command/SynchronizeCommand.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Command/ListSynchronizersCommand.php b/src/Command/ListSynchronizersCommand.php index ac935c3..cc4f131 100644 --- a/src/Command/ListSynchronizersCommand.php +++ b/src/Command/ListSynchronizersCommand.php @@ -38,10 +38,12 @@ protected function configure() /** * {@inheritDoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { foreach ($this->synchronizerRegistry->getObjectclasses() as $objectclass) { $output->writeln($objectclass); } + + return 0; } } diff --git a/src/Command/SynchronizeCommand.php b/src/Command/SynchronizeCommand.php index 88144b7..1712d48 100644 --- a/src/Command/SynchronizeCommand.php +++ b/src/Command/SynchronizeCommand.php @@ -59,7 +59,7 @@ protected function configure() /** * {@inheritDoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $force = $input->getOption('force'); $only = $input->getOption('only'); @@ -75,5 +75,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $this->synchronizerRegistry->getSynchronizer($objectclass) ->synchronize($objectclass, $force); } + + return 0; } }