Commit e0fab3b
committed
fix: 🐛 Leave null cache.serializable_classes untouched under Laravel 13
Laravel 13's cache.serializable_classes is tri-state: null disables
deserialization enforcement entirely, false blocks all objects, and an
array is an allow-list. The auto-registration introduced in 13.2.0
coerced null into an array, silently switching the whole application
into strict allow-list mode and breaking cache reads for any class
outside this package.
Return early when the value is null so apps that run with enforcement
disabled are left as they were. The false-to-array path is preserved so
hardened Laravel 13 apps still get working geocoder caching.
Seed the Laravel 13 default (false) in the test environment so the
discovery tests exercise the real hardened starting point instead of
the implicit null Testbench leaves in place.
Fixes #2101 parent 119bf84 commit e0fab3b
3 files changed
Lines changed: 26 additions & 1 deletion
File tree
- src/Providers
- tests
- Feature/Providers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
63 | | - | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
434 | 445 | | |
435 | 446 | | |
436 | 447 | | |
| |||
0 commit comments