diff --git a/GiiCommand.php b/GiiCommand.php index 74528a6..de52683 100644 --- a/GiiCommand.php +++ b/GiiCommand.php @@ -29,7 +29,7 @@ class GiiCommand extends Command /** * */ - protected function configure() + protected function configure(): void { $this->setName('sw:gii') ->addOption('make', 'm', InputArgument::OPTIONAL) diff --git a/GiiProviders.php b/GiiProviders.php index c4fb758..4b2277a 100644 --- a/GiiProviders.php +++ b/GiiProviders.php @@ -8,7 +8,6 @@ namespace Gii; use Kiri\Abstracts\Providers; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; -use Symfony\Component\Console\Application; /** * Class DatabasesProviders @@ -25,7 +24,7 @@ class GiiProviders extends Providers */ public function onImport(): void { - $console = $this->container->get(Application::class); - $console->add($this->container->get(GiiCommand::class)); + $console = $this->container->get(\Kiri\Application::class); + $console->command(GiiCommand::class); } }