Laravel 11 Release
Laravel 11.0.0
I've been up since 4:30. Not for the Laravel 11 release, but kids. Fortunately, they are off to daycare and napping because at 9:43, Laravel v11.0.0 was tagged!
While the Laravel 11.x Shift has been out for almost a month, it's not final until the official release is tagged. It's actually never final. I'm always making small tweaks.
Before moving on to the highlights of Laravel 11, I will say now is the best time to subscribe to a Shifty Plan. That's because until the end of the month the Latest plan includes both the Laravel 10.x Shift and Laravel 11.x Shift. So if you're still running Laravel 9 (which is end of life), it's a no-brainer. Of course, if you're running an older version of Laravel, the Legacy plan is also a no-brainer.
Alright, enough selling, let me break down the biggest change in Laravel 11 - a streamlined app structure.
Laravel 11 no longer includes many of the core files for a default app. I blogged about this long ago and am so glad to finally see it happen. All of the middleware you never change, the service providers, even the kernels - gone. If you need to customize these, you can republish them. But Laravel 11 has new ways to perform common customizations.
For example, the bootstrap/app.php
file is the new place to "bootstrap" your application with all the appropriate providers, middleware, and exception handling. All with simple callbacks and expressive methods. Another example is the routes/console.php
file. Any command scheduling is now done within this file alongside any closure commands.
While the decision to remove the configuration files from the default application was reversed, you may still do so. I wrote up a more in-depth article for Laravel News, but basically any core configuration file in your application is merged with a default within Laravel. This means you can completely remove any unchanged configuration file and slim any custom configuration file down to its custom values. Combined with the slew of new ENV
variables, I think most applications will be able to remove most of their config files.
To see the Laravel 11.x Shift in action, check out its demo video. If you're on Twitter, please help spread the word by sharing your Shifty experience. If you're on Reddit, please upvote the tutorial video.
As always, don't hesitate to reply with any feedback.
Start Shifting!