Skip to content

与 easyswoole 的help 命令 冲突问题 #1

@znau

Description

@znau

easySwoole\EasySwoole\Command\DefaultCommand 中有一个 help 命令

在调用 -h 的时候 symfony\console\Application.php 的get方法 里
`

    $command = $this->commands[$name];

    if ($this->wantHelps) {
        $this->wantHelps = false;

        $helpCommand = $this->get('help');
        $helpCommand->setCommand($command);

        return $helpCommand;
    }

`
setCommand 会找不到 ,因为 Hyperf\CommandEasyswoole\

`

    require_once __DIR__ . '/../Utility.php';

    $container = CommandContainer::getInstance();

    $list = $container->getCommandList();

    foreach ($list as $name) {
        $this->commands[] = new EasySwooleCommand($container->get($name));
    }

`
把 easyswoole 的命令 也加进去了

个人建议 命令 使用 hyperf.php 入口的时候 不要再 add easyswoole 的命令

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions