Skip to content

Commit fcc3c5a

Browse files
authored
Merge pull request #4 from Visual-Craft/update-symfony-version-7
fix commands
2 parents 9731274 + 49b47bb commit fcc3c5a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/Command/ClearQueueCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
namespace VisualCraft\Bundle\WorkQueueBundle\Command;
44

5+
use Symfony\Component\Console\Attribute\AsCommand;
56
use Symfony\Component\Console\Command\Command;
67
use Symfony\Component\Console\Input\InputArgument;
78
use Symfony\Component\Console\Input\InputInterface;
89
use Symfony\Component\Console\Output\OutputInterface;
910
use Symfony\Component\DependencyInjection\ServiceLocator;
1011
use VisualCraft\WorkQueue\QueueManager;
1112

13+
#[AsCommand(name: 'vc:work-queue:clear')]
1214
class ClearQueueCommand extends Command
1315
{
1416
protected static $defaultName = 'vc:work-queue:clear';
@@ -33,7 +35,7 @@ protected function configure()
3335
;
3436
}
3537

36-
protected function execute(InputInterface $input, OutputInterface $output)
38+
protected function execute(InputInterface $input, OutputInterface $output): int
3739
{
3840
$queues = array_unique($input->getArgument('queues'));
3941

src/Command/RunProcessorCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
namespace VisualCraft\Bundle\WorkQueueBundle\Command;
44

5+
use Symfony\Component\Console\Attribute\AsCommand;
56
use Symfony\Component\Console\Command\Command;
67
use Symfony\Component\Console\Input\InputArgument;
78
use Symfony\Component\Console\Input\InputInterface;
89
use Symfony\Component\Console\Output\OutputInterface;
910
use Symfony\Component\DependencyInjection\ServiceLocator;
1011

12+
#[AsCommand(name: 'vc:work-queue:run')]
1113
class RunProcessorCommand extends Command
1214
{
1315
protected static $defaultName = 'vc:work-queue:run';
@@ -28,7 +30,7 @@ protected function configure()
2830
;
2931
}
3032

31-
protected function execute(InputInterface $input, OutputInterface $output)
33+
protected function execute(InputInterface $input, OutputInterface $output): int
3234
{
3335
$queue = $input->getArgument('queue');
3436

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class Configuration implements ConfigurationInterface
99
{
10-
public function getConfigTreeBuilder()
10+
public function getConfigTreeBuilder(): TreeBuilder
1111
{
1212
$treeBuilder = new TreeBuilder('visual_craft_work_queue');
1313
$treeBuilder->getRootNode()

0 commit comments

Comments
 (0)