Skip to content

Commit e6cf6c0

Browse files
committed
Issue #77: Bump dot-cli to v3.11.1
Signed-off-by: bota <Bota@dotkernel.com>
1 parent 52f9747 commit e6cf6c0

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"require": {
4646
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
47-
"dotkernel/dot-cli": "^3.9",
47+
"dotkernel/dot-cli": "^3.11.1",
4848
"dotkernel/dot-dependency-injection": "^1.2",
4949
"dotkernel/dot-errorhandler": "4.2.1",
5050
"laminas/laminas-component-installer": "^3.5",

src/Swoole/Delegators/TCPServerDelegator.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Queue\Swoole\Command\GetFailedMessagesCommand;
1212
use Queue\Swoole\Command\GetProcessedMessagesCommand;
1313
use Queue\Swoole\Command\GetQueuedMessagesCommand;
14-
use Queue\Swoole\Exception\RuntimeException;
1514
use Swoole\Server as TCPSwooleServer;
1615
use Symfony\Component\Console\Application;
1716
use Symfony\Component\Console\Input\ArrayInput;
@@ -24,8 +23,6 @@
2423
use function array_shift;
2524
use function explode;
2625
use function ltrim;
27-
use function method_exists;
28-
use function sprintf;
2926
use function str_starts_with;
3027
use function trim;
3128

@@ -66,15 +63,7 @@ public function __invoke(ContainerInterface $container, string $serviceName, cal
6663
$commandClass = $commandMap[$commandName];
6764
$application = new Application();
6865
$commandInstance = $container->get($commandClass);
69-
if (method_exists($application, 'addCommand')) {
70-
$application->addCommand($commandInstance);
71-
} elseif (method_exists($application, 'add')) {
72-
$application->add($commandInstance);
73-
} else {
74-
throw new RuntimeException(
75-
sprintf('%s contains no "add" or "addCommand" method.', $application::class)
76-
);
77-
}
66+
$application->addCommand($commandInstance);
7867

7968
$parsedOptions = [];
8069
foreach ($args as $arg) {

0 commit comments

Comments
 (0)