Repository navigation
v5.0.1
Bug Fix
Fix: SettingStorage::all() returns __PHP_Incomplete_Class instead of Collection when using the database cache driver (CACHE_STORE=database).
Root Cause
-
Cross-request:
all()cached aCollectionobject. The database cache driver usesserialize()— onunserialize()in the next request, ifCollectionisn't autoloaded yet, PHP returns__PHP_Incomplete_Class. -
Within-request:
flushCache()usedCache::forget()which only clears the persistent store, leaving theMemoizedStorein-memory layer stale.
Changes
all()now caches a plain array (->toArray()) and wraps incollect()on readflushCache()now usesCache::memo()->forget()to clear both layers- Self-healing guard for legacy cached values
Upgrade
No breaking changes. composer update timurturdyev/simple-settings