diff --git a/src/Command/TinkerCommand.php b/src/Command/TinkerCommand.php index bcb7b1d..92bb726 100644 --- a/src/Command/TinkerCommand.php +++ b/src/Command/TinkerCommand.php @@ -11,7 +11,6 @@ namespace FriendsOfHyperf\Tinker\Command; use FriendsOfHyperf\Tinker\ClassAliasAutoloader; -use Hyperf\Command\Annotation\Command; use Hyperf\Command\Command as HyperfCommand; use Hyperf\Contract\ConfigInterface; use Psr\Container\ContainerInterface; @@ -24,10 +23,6 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; -/** - * @Command - */ -#[Command] class TinkerCommand extends HyperfCommand { /** diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index be0b2ff..839f75a 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -18,18 +18,13 @@ public function __invoke(): array defined('BASE_PATH') or define('BASE_PATH', ''); return [ - 'annotations' => [ - 'scan' => [ - 'paths' => [ - __DIR__, - ], - ], + 'commands' => [ + Command\TinkerCommand::class, ], - 'commands' => [], 'publish' => [ [ 'id' => 'config', - 'description' => 'The config for Tinker.', + 'description' => 'The config for tinker.', 'source' => __DIR__ . '/../publish/tinker.php', 'destination' => BASE_PATH . '/config/autoload/tinker.php', ],