Skip to content

Commit 9d90bd4

Browse files
committed
(feat): bootloader returns ApplicationBuilder instead of Application
1 parent d3a5543 commit 9d90bd4

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/helpers.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
namespace Yard\Nutshell;
66

77
use Roots\Acorn\Application;
8+
use Roots\Acorn\Configuration\ApplicationBuilder;
89
use Roots\Acorn\Configuration\Exceptions;
910
use Roots\Acorn\Configuration\Middleware;
1011
use Sentry\Laravel\Integration;
1112
use Spatie\Csp\AddCspHeaders;
1213

13-
function bootloader(): Application
14+
function bootloader(?string $basePath = null): ApplicationBuilder
1415
{
15-
$application = Application::configure()
16+
return Application::configure($basePath)
1617
->withBindings([
1718
\Roots\Acorn\Bootstrap\LoadConfiguration::class => \Yard\Nutshell\Bootstrap\LoadConfiguration::class,
1819
\Roots\Acorn\Console\Kernel::class => \Yard\Nutshell\Console\Kernel::class,
@@ -25,9 +26,5 @@ function bootloader(): Application
2526
->withMiddleware(function (Middleware $middleware) {
2627
$middleware->append(AddCspHeaders::class);
2728
})
28-
->withRouting(wordpress: true)
29-
->boot()
30-
->usePublicPath(get_theme_file_path('public'));
31-
32-
return $application;
29+
->withRouting(wordpress: true);
3330
}

0 commit comments

Comments
 (0)