From 1cf5a41b2f5c0f1ceb00115e981d15c49f0f4a5f Mon Sep 17 00:00:00 2001 From: Frederik Rommel Date: Sat, 30 Nov 2019 19:29:52 +0100 Subject: [PATCH 1/2] fix deprecated warnings --- src/Command/Scheduler/PruneCommand.php | 4 ++-- src/Command/Scheduler/RunCommand.php | 4 ++-- src/Command/Scheduler/SyncCommand.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Command/Scheduler/PruneCommand.php b/src/Command/Scheduler/PruneCommand.php index 7e26126..a28c178 100644 --- a/src/Command/Scheduler/PruneCommand.php +++ b/src/Command/Scheduler/PruneCommand.php @@ -2,7 +2,7 @@ namespace Glooby\TaskBundle\Command\Scheduler; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -11,7 +11,7 @@ /** * @author Emil Kilhage */ -class PruneCommand extends ContainerAwareCommand +class PruneCommand extends Command { private $container; diff --git a/src/Command/Scheduler/RunCommand.php b/src/Command/Scheduler/RunCommand.php index c18da33..fc75e6b 100644 --- a/src/Command/Scheduler/RunCommand.php +++ b/src/Command/Scheduler/RunCommand.php @@ -2,7 +2,7 @@ namespace Glooby\TaskBundle\Command\Scheduler; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -10,7 +10,7 @@ /** * @author Emil Kilhage */ -class RunCommand extends ContainerAwareCommand +class RunCommand extends Command { private $container; diff --git a/src/Command/Scheduler/SyncCommand.php b/src/Command/Scheduler/SyncCommand.php index 2bc43cd..124b25a 100644 --- a/src/Command/Scheduler/SyncCommand.php +++ b/src/Command/Scheduler/SyncCommand.php @@ -2,7 +2,7 @@ namespace Glooby\TaskBundle\Command\Scheduler; -use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -11,7 +11,7 @@ /** * @author Emil Kilhage */ -class SyncCommand extends ContainerAwareCommand +class SyncCommand extends Command { private $container; From a3aa1990f9d3d2e97e7dc897239aea69ef5d17fe Mon Sep 17 00:00:00 2001 From: Frederik Rommel Date: Sat, 30 Nov 2019 19:38:22 +0100 Subject: [PATCH 2/2] fix deprecated warnings --- src/Command/Scheduler/PruneCommand.php | 3 +++ src/Command/Scheduler/RunCommand.php | 3 +++ src/Command/Scheduler/SyncCommand.php | 3 +++ src/Command/Task/RunCommand.php | 2 ++ 4 files changed, 11 insertions(+) diff --git a/src/Command/Scheduler/PruneCommand.php b/src/Command/Scheduler/PruneCommand.php index a28c178..d161f5a 100644 --- a/src/Command/Scheduler/PruneCommand.php +++ b/src/Command/Scheduler/PruneCommand.php @@ -41,5 +41,8 @@ protected function execute(InputInterface $input, OutputInterface $output) } else { $pruner->run(); } + + // TODO add logging (example if an error occurs) - and return zero + return 1; } } diff --git a/src/Command/Scheduler/RunCommand.php b/src/Command/Scheduler/RunCommand.php index fc75e6b..6c40053 100644 --- a/src/Command/Scheduler/RunCommand.php +++ b/src/Command/Scheduler/RunCommand.php @@ -41,5 +41,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $scheduler = $this->container->get('glooby_task.queue_scheduler'); $scheduler->schedule(); + + // TODO add logging (example if an error occurs) - and return zero + return 1; } } diff --git a/src/Command/Scheduler/SyncCommand.php b/src/Command/Scheduler/SyncCommand.php index 124b25a..a38c407 100644 --- a/src/Command/Scheduler/SyncCommand.php +++ b/src/Command/Scheduler/SyncCommand.php @@ -38,5 +38,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $client = $this->container->get('glooby_task.schedule_synchronizer'); $client->setForce($input->getOption('force')); $client->sync(); + + // TODO add logging (example if an error occurs) - and return zero + return 1; } } diff --git a/src/Command/Task/RunCommand.php b/src/Command/Task/RunCommand.php index 04b955d..3d12fdd 100644 --- a/src/Command/Task/RunCommand.php +++ b/src/Command/Task/RunCommand.php @@ -60,6 +60,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $output->writeln($response); } } + + return 1; } /**