Skip to content

Commit

Permalink
fix acorn router not being loaded when WP_CLI is active
Browse files Browse the repository at this point in the history
  • Loading branch information
digital-joe-co committed Jun 12, 2023
1 parent d63c4f5 commit 5d1bb21
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Roots/Acorn/Bootloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ public function boot($callback = null)
}

if (Env::get('ACORN_ENABLE_EXPIRIMENTAL_ROUTER')) {
$app->singleton(
\Illuminate\Contracts\Http\Kernel::class,
\Roots\Acorn\Http\Kernel::class
);
return $this->bootHttp($app);
}

Expand Down Expand Up @@ -261,12 +257,14 @@ public function getApplication(): ApplicationContract

$this->app->singleton(
\Illuminate\Contracts\Http\Kernel::class,
$this->app->config->get('kernels.http', \Roots\Acorn\Kernel::class)
Env::get('ACORN_ENABLE_EXPIRIMENTAL_ROUTER')
? \Roots\Acorn\Http\Kernel::class
: \Roots\Acorn\Kernel::class
);

$this->app->singleton(
\Illuminate\Contracts\Console\Kernel::class,
$this->app->config->get('kernels.console', \Roots\Acorn\Console\Kernel::class)
\Roots\Acorn\Console\Kernel::class
);

$this->app->singleton(
Expand Down

0 comments on commit 5d1bb21

Please sign in to comment.