From 7a4a9257c390dd1afba1244ac8b8db2890b5a897 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 17 Aug 2023 15:41:25 +0200 Subject: [PATCH] Implement doctrine orm as command --- app/Console/OrmCommand.php | 33 +++++++++++++++++++++++++++++++++ app/Kernel.php | 2 ++ app/bin.php | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 app/Console/OrmCommand.php diff --git a/app/Console/OrmCommand.php b/app/Console/OrmCommand.php new file mode 100644 index 0000000..bf9ab0e --- /dev/null +++ b/app/Console/OrmCommand.php @@ -0,0 +1,33 @@ +entityManager)); + $cli->run(new ArgvInput($argv)); + } +} \ No newline at end of file diff --git a/app/Kernel.php b/app/Kernel.php index 24a028c..e900f9e 100644 --- a/app/Kernel.php +++ b/app/Kernel.php @@ -2,6 +2,7 @@ namespace App; +use App\Console\OrmCommand; use App\Console\TestCommand; use App\Controller\HelloWorldController; use Ardent\Undercurrent\Console\CommandsConfig; @@ -19,6 +20,7 @@ class Kernel extends BaseKernel $commands = new CommandsConfig(); $commands->add(TestCommand::class); + $commands->add(OrmCommand::class); $this->addCommands($container, $commands); } } \ No newline at end of file diff --git a/app/bin.php b/app/bin.php index 4c41891..d060538 100755 --- a/app/bin.php +++ b/app/bin.php @@ -11,4 +11,4 @@ $kernel = new Kernel(new AppConfig(__DIR__ . '/../app')); $container = $kernel->setup(); $console = new Console($container); -$console->run(); \ No newline at end of file +$console->run();