Skip to content

Commit 0708b3d

Browse files
committed
Provide App name and version into Console Application
1 parent fa0dc30 commit 0708b3d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Application/Bootloader/ConsoleBootloader.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Butschster\ContextGenerator\Application\Bootloader;
66

7+
use Butschster\ContextGenerator\Application\Application;
78
use Butschster\ContextGenerator\Application\Dispatcher\ConsoleDispatcher;
89
use Spiral\Boot\AbstractKernel;
910
use Spiral\Boot\Bootloader\Bootloader;
@@ -23,7 +24,7 @@ public function __construct(
2324
private readonly ConfiguratorInterface $config,
2425
) {}
2526

26-
public function init(AbstractKernel $kernel, BinderInterface $binder): void
27+
public function init(AbstractKernel $kernel, BinderInterface $binder, Application $app): void
2728
{
2829
$kernel->bootstrapped(static function (AbstractKernel $kernel): void {
2930
$kernel->addDispatcher(ConsoleDispatcher::class);
@@ -41,6 +42,8 @@ public function init(AbstractKernel $kernel, BinderInterface $binder): void
4142
[
4243
'interceptors' => [],
4344
'commands' => [],
45+
'name' => $app->name,
46+
'version' => $app->version,
4447
],
4548
);
4649
}

0 commit comments

Comments
 (0)