Use ConfigProvider to register the command and remove useless output

This commit is contained in:
huangzhhui 2020-06-09 23:03:25 +08:00
parent 43c629b69f
commit 41f3f9bc51
2 changed files with 5 additions and 6 deletions

View File

@ -11,6 +11,8 @@ declare(strict_types=1);
*/
namespace Hyperf\Devtool;
use Hyperf\Devtool\Describe;
class ConfigProvider
{
public function __invoke()
@ -23,6 +25,9 @@ class ConfigProvider
],
],
],
'commands' => [
Describe\RoutesCommand::class,
],
'publish' => [
[
'id' => 'config',

View File

@ -11,7 +11,6 @@ declare(strict_types=1);
*/
namespace Hyperf\Devtool\Describe;
use Hyperf\Command\Annotation\Command;
use Hyperf\Command\Command as HyperfCommand;
use Hyperf\Contract\ConfigInterface;
use Hyperf\HttpServer\MiddlewareManager;
@ -25,9 +24,6 @@ use Symfony\Component\Console\Helper\TableSeparator;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
/**
* @Command
*/
class RoutesCommand extends HyperfCommand
{
/**
@ -58,8 +54,6 @@ class RoutesCommand extends HyperfCommand
$this->analyzeRouter($server, $router, $path),
$this->output
);
$this->output->success('success.');
}
protected function configure()