Laravel 11: Embracing the Minimalist Evolution
The PHP world just shifted. With the release of
The Great Structural Purge
app folder is a shadow of its former self. GONE are the HTTP and Console kernels. The middleware folder—which used to house nine default files—has vanished. Even the providers directory now only holds a single AppServiceProvider. This isn't about losing functionality; it's about moving configuration to the bootstrap/app.php file, where you can fluently define your middleware and exception handling without jumping between dozens of files.
Intelligent New Defaults
Starting a new project is faster than ever.
Built-in Health Monitoring
A new health argument in the routing configuration provides a dedicated endpoint for monitoring. This standardizes how third-party services check if your application is alive. It even dispatches a health event, allowing you to hook in custom checks for your database, cache, or external API dependencies without building a custom controller from scratch.
Graceful Key Rotation
Security updates used to be painful. If you rotated your application key, every logged-in user faced immediate session termination and cookie decryption errors.
Testing the Queue with Precision
Testing whether a job was released, deleted, or delayed used to require complex fakes and stubs. The new withQueueInteractions method changes the game. It allows for clean, expressive assertions on queue behavior, ensuring your background logic is as robust as your HTTP endpoints. It's a massive win for developers who prioritize high test coverage.
