Skip to content

Commit

Permalink
Eliminate yii-console dep
Browse files Browse the repository at this point in the history
  • Loading branch information
xepozz committed Dec 25, 2023
1 parent 2639357 commit b742957
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"php": "^8.0",
"psr/log": "^2.0|^3.0",
"psr/container": "^1.0|^2.0",
"yiisoft/yii-console": "^2.0",
"yiisoft/definitions": "^1.0|^2.0|^3.0",
"yiisoft/friendly-exception": "^1.0",
"yiisoft/injector": "^1.0",
Expand Down
3 changes: 1 addition & 2 deletions src/Command/ListenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Yiisoft\Yii\Console\ExitCode;
use Yiisoft\Yii\Queue\QueueFactory;
use Yiisoft\Yii\Queue\QueueFactoryInterface;

Expand Down Expand Up @@ -38,6 +37,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
->get($input->getArgument('channel'))
->listen();

return ExitCode::OK;
return 0;
}
}
3 changes: 1 addition & 2 deletions src/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Yiisoft\Yii\Console\ExitCode;
use Yiisoft\Yii\Queue\QueueFactory;
use Yiisoft\Yii\Queue\QueueFactoryInterface;

Expand Down Expand Up @@ -38,6 +37,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
->get($input->getArgument('channel'))
->run();

return ExitCode::OK;
return 0;
}
}
3 changes: 1 addition & 2 deletions tests/Unit/Command/ListenCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\OutputInterface;
use Yiisoft\Yii\Console\ExitCode;
use Yiisoft\Yii\Queue\Command\ListenCommand;
use Yiisoft\Yii\Queue\QueueFactoryInterface;
use Yiisoft\Yii\Queue\QueueInterface;
Expand All @@ -32,6 +31,6 @@ public function testExecute(): void
$command = new ListenCommand($queueFactory);
$exitCode = $command->run($input, $this->createMock(OutputInterface::class));

$this->assertEquals(ExitCode::OK, $exitCode);
$this->assertEquals(0, $exitCode);
}
}
3 changes: 1 addition & 2 deletions tests/Unit/Command/RunCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\OutputInterface;
use Yiisoft\Yii\Console\ExitCode;
use Yiisoft\Yii\Queue\Command\RunCommand;
use Yiisoft\Yii\Queue\QueueFactoryInterface;
use Yiisoft\Yii\Queue\QueueInterface;
Expand All @@ -32,6 +31,6 @@ public function testExecute(): void
$command = new RunCommand($queueFactory);
$exitCode = $command->run($input, $this->createMock(OutputInterface::class));

$this->assertEquals(ExitCode::OK, $exitCode);
$this->assertEquals(0, $exitCode);
}
}

0 comments on commit b742957

Please sign in to comment.