Since Laravel 11 introduced the new minimal application structure #57326
Replies: 2 comments 9 replies
-
From our knowledge the old way still works except the middleware part. There are ways to handle the middlewares in the new structure but you need to read the docs on how to do it. For deleting the files on upgrade that is news to us... We did not like this change either so we were forced to do something radical. |
Beta Was this translation helpful? Give feedback.
-
Many of the behaviors defined as global are, in some sense, specific behaviors. For middleware, you can define them directly in the routes, either grouped or individually. Can you give an example of how to use a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
11
PHP Version
8.3
Database Driver & Version
No response
Description
Since Laravel 11 introduced the new minimal application structure, some important files and configuration entry points — such as
app/Http/Kernel.php
,app/Console/Kernel.php
, and even some logic insidebootstrap/app.php
— were removed or significantly changed.While this new minimal setup looks clean, it causes serious issues during framework upgrades or when developers add custom logic in the
bootstrap
directory.Steps To Reproduce
In previous versions (up to Laravel 10), developers could easily:
However, with Laravel 11:
bootstrap/
directory, those changes can be lost or overwritten during upgrades.This leads to confusion and potential project instability for teams upgrading from Laravel 10 to 11.
bootstrap/
during updates.Kernel
customization.Possible Solutions
bootstrap/custom.php
file (or similar) that is ignored by the updater, meant for developer-defined bootstrap logic.app/Http/Kernel.php
andapp/Console/Kernel.php
behavior.Environment
Summary
Laravel 11’s minimal structure is great for small or fresh projects, but it unintentionally breaks customization patterns used by many production-grade apps.
It would be helpful if the Laravel core team could introduce an upgrade-safe customization point or document the new best practice for advanced bootstrap and kernel overrides.
Thanks for your amazing work maintaining Laravel — this change just needs a bit more clarity and stability for developers upgrading from older versions.
Beta Was this translation helpful? Give feedback.
All reactions