Change default middleware in bootstrap/app.php in Laravel 11
Closed this issue · 0 comments
ivanvermeyen commented
Hi,
My package needs to run a middleware in the web
group in a certain order/priority.
Before Laravel 11, I could stub the Kernel.php
file in my base TestCase:
protected function resolveApplicationHttpKernel($app): void
{
$app->singleton(
'Illuminate\Contracts\Http\Kernel',
'My\Tests\Stubs\Kernel'
);
}
But as of Laravel 11, this is now handled in bootstrap/app.php
.
Is there a way to stub this file too?