What’s Changed and Upgrading
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. The reference material consulted while preparing these pages is listed in the section bibliography. |
This page is written against Laravel 13.x (13.34.0) on PHP 8.3 to 8.5, checked on 2026-10-05. The newest of the books, Laravel: Up & Running (2nd ed., 2019), describes Laravel 5.8 on PHP 7.1. Since then there have been eight major releases, and the framework’s structure, defaults and recommended packages have changed more than its core ideas. This page summarises the releases, shows what old code does on Laravel 13, and collects in one table the outdated statements that the pages of this section correct one by one. The PHP language side, from PHP 7 to 8.5, is on What’s New and Migration.
Releases from 6 to 13
Laravel has used semantic versioning since 6.0 and ships one major version a year. Each release in one line:
| Version | Year | Main changes |
|---|---|---|
6 (LTS) |
2019 |
Semantic versioning. |
7 |
2020 |
Sanctum (as Airlock), the |
8 |
2020 |
|
9 |
2022 |
PHP 8.0. Symfony Mailer, Flysystem 3, |
10 |
2023 |
PHP 8.1. Native types in the skeleton, the |
11 |
2024 |
PHP 8.2. The slim skeleton: |
12 |
2025 |
Minimal breaking changes. React, Vue, Svelte and Livewire starter kits replace Breeze and Jetstream. UUIDv7 for |
13 |
2026 |
PHP 8.3. The AI SDK, JSON:API resources, |
Source: Laravel — Release Notes
Support policy
Each release gets bug fixes for 18 months and security fixes for 2 years:
| Version | PHP | Released | Bug fixes until | Security fixes until |
|---|---|---|---|---|
10 |
8.1 to 8.3 |
2023-02-14 |
2024-08-06 |
2025-02-04 |
11 |
8.2 to 8.4 |
2024-03-12 |
2025-09-03 |
2026-03-12 |
12 |
8.2 to 8.5 |
2025-02-24 |
2026-08-13 |
2027-02-24 |
13 |
8.3 to 8.5 |
2026-03-17 |
Q3 2027 |
2028-03-17 |
Source: Laravel — Support Policy
On 2026-10-05, Laravel 11 and older receive no fixes, 12 receives security fixes only, and 13 is the release to be on.
There is no LTS release since 6. Every application upgrades once a year, or at least every second year. Laravel 14
is expected in the first quarter of 2027 and will require PHP 8.4 or later. An application on PHP 8.3 has to upgrade
PHP before it can move to Laravel 14. composer prohibits php 8.2 shows what holds an application to a PHP version.
In Bookshelf, laravel/laravel itself, laravel/ai, Intervention Image, paratest and the local bookshelf/isbn
package require ^8.3.
Old code on Laravel 13
Code from the books and from Laravel 5-era tutorials, run in Bookshelf:
<?php
str_slug('Wild Seed'); // 5.7 helper
array_get(['x' => ['y' => 1]], 'x.y'); // 5.7 helper
Input::get('q'); // facade removed in 6
Route::get('/legacy-string-route', 'BookController@index'); // controller strings without a namespace
new class extends Model { protected $dates = ['due_at']; }; // removed in 10
factory(App\Models\Book::class)->make(); // 5.x factory helper
new App\User; // 5.x model location
Request::create('/?q=')->has('q'); // has() versus filled()
Source: Laravel — Upgrade Guide
str_slug('Wild Seed') (5.7 helper) -> Error: Call to undefined function str_slug()
array_get($a, 'x.y') (5.7 helper) -> Error: Call to undefined function array_get()
Input::get('q') (facade removed in 6) -> Error: Class "Input" not found
Route 'BookController@index' (no namespace) -> 500, log: Target class [BookController] does not exist
$dates = ['due_at'] on a model (removed in 10) -> string
Carbon on a casts() datetime -> Illuminate\Support\Carbon
factory(App\Models\Book::class) (5.x helper) -> Error: Call to undefined function factory()
App\User (5.x model location) -> Error: Class "App\User" not found
$request->has('q') on an empty value -> true / filled: false
Source: Laravel — Date Casting
Most of this fails loudly, which is the easy case. The $dates line is the dangerous one: the property is silently
ignored, so due_at stays a string and code that calls ->isPast() on it fails later and somewhere else. The has()
line has not changed, but tutorials often use it where filled() is meant. The fixes are on the pages for each
feature: Str::slug() and Arr::get() (Collections and
Pagination), [BookController::class, 'index'] (Routing), the casts() method
(Eloquent Casts, Accessors and Serialization),
class factories (Migrations, Seeders and Factories) and
app/Models (Eloquent Models).
The Laravel 11 skeleton
Laravel 11 removed app/Http/Kernel.php, app/Console/Kernel.php, app/Exceptions/Handler.php and most service
providers from new applications. Middleware, exception handling and routing moved into bootstrap/app.php (54
lines in Bookshelf), the schedule into routes/console.php, and the remaining providers into
bootstrap/providers.php. Bookshelf’s app/Http holds only Controllers, Middleware, Requests, Resources
and Responses.
Existing applications do not need to change their structure. The upgrade guide for 11 says so explicitly: an application upgraded from 10 keeps its kernels and providers, and they keep working. The new structure is the default for new applications and what the documentation describes. Moving an old application to it is optional cleanup, and Laravel Shift offers it as a separate step. The mapping is on Directory Structure and Configuration and Middleware.
Upgrading to 13
Laravel 13 has three high-impact items and two medium ones, and most applications upgrade without code changes:
-
Dependencies:
laravel/framework^13.0,laravel/tinker^3.0,phpunit/phpunit^12.0,pestphp/pest^4.0andlaravel/boost^2.0, plus an updated installer. -
Request forgery protection:
VerifyCsrfTokenbecamePreventRequestForgery. References inbootstrap/app.php, tests (withoutMiddleware(VerifyCsrfToken::class)) and the$exceptlist move to the new class andpreventRequestForgery(except: …)(Security: CSRF, Encryption and Hashing). -
Cache
serializable_classes: cached objects come back as__PHP_Incomplete_Classunless listed. In Bookshelf this broke a cached Eloquent model and a cachedCollection(Cache and Rate Limiting). -
upserton MySQL and MariaDB changed how the unique columns are passed.
The upgrade guide lists the low-impact items, such as cache prefixes, session cookie names and event property renames, each with its likelihood of affecting an application.
Tools for upgrading
-
Laravel Shift (laravelshift.com, commercial) opens a pull request per upgrade step. It covers the version bump, the renamed classes, the configuration files and, optionally, the new skeleton. Running one Shift per major version, in order, is the usual way to bring a 5.x application forward.
-
Rector with
driftingly/rector-laravelapplies automated refactorings, such as helpers to facades,$datesto casts and string routes to callables, through level sets per version.rector/rectoris published as a prebuilt package, andcomposer require --dev rector/rector driftingly/rector-laravelfailed in this environment (Could not authenticate against github.comfor the dist archive), so it was not run here. -
Boost gives a coding agent the
/upgrade-laravel-v13command with the upgrade guide as context (AI SDK, MCP and Boost).
All three work best on a codebase with tests, because an upgrade is mostly verifying that nothing changed. The suite on Testing is what makes a yearly upgrade a day’s work.
Every outdated statement in one table
The books' statements about web development and Laravel that are no longer true, with the version where each changed and the page that covers it. PHP language changes are on the PHP Reference’s migration page.
| The books say | Changed in | Now | Page |
|---|---|---|---|
Models in |
8 |
|
|
|
8 |
|
|
|
8 |
class factories with |
|
|
10, 11 |
|
|
|
9 |
|
|
|
7, 8 |
|
|
|
11 |
|
|
|
11 |
|
|
|
9, 11 |
|
|
|
6 |
|
|
|
6, 8, 12 |
|
|
A plain-text |
7 |
Sanctum with SHA-256 hashed tokens |
|
Passport for every API |
7, 11 |
Sanctum for first-party clients, Passport opt-in via |
|
|
13 |
|
|
MD5 or SHA-1 passwords, |
always wrong |
|
|
Laravel Mix and |
9.19 |
Vite and |
|
jQuery and |
n/a |
|
|
Mailable |
9 |
|
|
|
11, 13 |
|
|
|
11 |
event discovery |
|
|
11 |
|
|
Pusher, |
11 |
Reverb |
|
|
5.8 |
seconds |
|
Caching models and collections |
13 |
arrays, or listed |
|
|
always wrong |
|
|
|
7 |
the |
|
PHPUnit classes with |
10, 11 |
Pest by default, fakes, attributes |
|
Homestead and Valet (Stauffer ch. 2) |
8, 11 |
Sail and Herd |
|
|
5.5, 11 |
package discovery, |
|
Lumen for APIs and micro-services |
10 |
Laravel itself, with |
Source: Laravel — Upgrade Guide and Release Notes
Where older books and tutorials are outdated
-
"Laravel releases an LTS version every two years" stopped after 6. Every release now has 18 months of bug fixes and two years of security fixes.
-
"Upgrade guides are long" was true for 5.x. Laravel 12 and 13 were designed for minimal breaking changes.
-
Upgrading by copying the new skeleton over the old application loses customisations. The upgrade guide, Shift or Rector change only what is needed.
References
-
Matt Stauffer — Laravel: Up & Running, 2nd ed. (O’Reilly, 2019); current edition 3rd ed. (2023)
-
Frank M. Kromann — Beginning PHP and MySQL, 5th ed. (Apress, 2018), David Powers — PHP 7 Solutions, 4th ed. (Apress, 2019), Robin Nixon — Learning PHP, MySQL & JavaScript, 5th ed. (O’Reilly, 2018) and Porębski et al. — Building PHP Applications with Symfony, CakePHP, and Zend Framework (Wiley, 2011)