Upgrade to Laravel 13

Bump laravel/framework to ^13.0 and laravel/tinker to ^3.0 per the 12.x
to 13.0 upgrade guide. php ^8.5 already satisfied the new minimum.

Transitively picks up Fortify 1.37.3, Octane 2.18.0, Livewire 4.3.3,
Mary 2.9.7 and Pest 4.7.5, all of which already declare ^13.0 support.

Add 'serializable_classes' => false to config/cache.php. When the key is
absent it defaults to null, which leaves unserialize() unrestricted; false
blocks object deserialization so a leaked APP_KEY cannot be used to drive a
gadget chain through the cache. Safe here as no app code uses the cache.

Audited every breaking change in the guide against the codebase with no
hits: VerifyCsrfToken/ValidateCsrfToken (now PreventRequestForgery),
JobAttempted->exceptionOccurred, QueueBusy->$connection, pagination::default,
Js::from and array_first/array_last. config/cache.php and config/database.php
already used the new hyphenated prefixes, so cache keys and session cookies
are unchanged and nothing invalidates on deploy.

Verified: 123 tests pass (306 assertions), migrations apply cleanly, and
/up, /login and the Livewire asset all serve 200 over HTTP.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Andreas Reinhold / reini
2026-07-23 11:16:53 +02:00
co-authored by Claude Opus 4.8
parent 1e07580bb2
commit 1ebd51248e
3 changed files with 2173 additions and 1259 deletions
+2 -2
View File
@@ -11,9 +11,9 @@
"require": {
"php": "^8.5",
"laravel/fortify": "^1.30",
"laravel/framework": "^12.0",
"laravel/framework": "^13.0",
"laravel/octane": "^2.13",
"laravel/tinker": "^2.10.1",
"laravel/tinker": "^3.0",
"livewire/livewire": "^4.0",
"robsontenorio/mary": "^2.7"
},
Generated
+2158 -1257
View File
File diff suppressed because it is too large Load Diff
+13
View File
@@ -114,4 +114,17 @@ return [
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
/*
|--------------------------------------------------------------------------
| Serializable Classes
|--------------------------------------------------------------------------
|
| This value determines the classes that can be unserialized from cache
| storage. By default, no PHP classes will be unserialized from your
| cache to prevent gadget chain attacks if your APP_KEY is leaked.
|
*/
'serializable_classes' => false,
];