Skip to content

Change default middleware in bootstrap/app.php in Laravel 11 #396

Closed

Description

@ivanvermeyen

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?

Activity

  1. locked and limited conversation to collaborators on Mar 13, 2024
  2. converted this issue into a discussion #398 on Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions