Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MikeF1986's avatar

Upgrade from v10.0 to v11.16.0

After upgrading laravel/framework and all associated dependencies, codebase still remains as v10.0.

Output from php artisan --version returns v11.16.0. Contents of boostrap\app.php:


/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/

$app = new Illuminate\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);

/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/

$app->singleton(
    Illuminate\Contracts\Http\Kernel::class,
    App\Http\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Console\Kernel::class,
    App\Console\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    App\Exceptions\Handler::class
);

/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/

return $app;
0 likes
4 replies
tykus's avatar

However, we do not recommend that Laravel 10 applications upgrading to Laravel 11 attempt to migrate their application structure, as Laravel 11 has been carefully tuned to also support the Laravel 10 application structure.

https://laravel.com/docs/11.x/upgrade#application-structure

You have a Laravel 11 application.

Snapey's avatar

The upgrade process does not touch anything outside of the vendor folder.

The upgrade instructions advise you if you need to make any changes to your app.

In many cases, the Laravel 10 code runs as before, with as @tykus quotes, no need for you to match the new reduced file structure.

Personally, I have my concerns. If the layout is left as is then as we upgrade to 12 and 13, I doubt the upgrade instructions will take into account those users with the old structure.

Unfortunately the only way to adopt the new file structure is to create a new project and move all your code across and doing things like adopting new middleware config through app.php

MikeF1986's avatar

@Snapey thank you both.

Yea, the new middleware structure is what I was looking to achieve, hence me noticing it hadn’t updated bootstrap/app.php.

Please or to participate in this conversation.