Skip to content

🛡️ 13.2.0 — Laravel 13 cache compatibility

Latest

Choose a tag to compare

@mikebronner mikebronner released this 19 May 17:06
119bf84

Added

  • ✨ Auto-register Geocoder model classes for Laravel 13 cache serialization. by @mikebronner in #209

Laravel 13 introduced cache.serializable_classes as a security hardening measure, defaulting to false to block deserialization of arbitrary PHP objects from the cache. This silently broke caching for any Laravel 13 user — geocoder results round-trip as Collections of Address objects, which the hardened default refuses to deserialize.

This release makes Laravel 13 caching work seamlessly without requiring you to maintain an allow-list.

⚠️ Behavior change worth noting

If you're on Laravel 13 and have deliberately set cache.serializable_classes to a strict allow-list (or []) for security reasons, this release will merge the Geocoder model classes into your list at boot. The merge preserves your existing entries — but it does expand the allow-list beyond what you set.

If you want to keep your allow-list strictly under your own control:

// config/geocoder.php
'cache' => [
    // ...
    'auto_register_serializable_classes' => false,
],

When opted out, you have two coherent paths — see the README's Laravel 13 cache.serializable_classes section for the trade-offs.

🔧 Upgrade

Pure composer update. No required config changes, no API breakage, no migrations.

Laravel 11 / 12 users: this release is functionally inert for you — the new config key is a no-op on framework versions that don't use cache.serializable_classes.
`

Full Changelog: 13.1.1...13.2.0