overtrue/laravel-options
A simple key-value options manager for Laravel. Store application settings in the database, cache them for fast retrieval, and access values through helpers or the Options facade. Supports defaults, forgetting, and bulk updates.
get/set, JSON-valued updates, selected-key reads, null/default handling, deletion, a console command, and a provider abstraction with events. A PM can use it to justify not spending roadmap capacity on an in-house settings table plus cache-invalidation layer, and instead spend that capacity on customer-facing work.env/config files (deploy-time, immutable) versus a database-backed option store (runtime-editable, tenant-overridable). This is a recurring architectural debate that the package lets you settle cheaply.TypeErrors in the documented no-argument Option::get() read and in Option::get('0'). Both were reproduced before fixing and are now covered by regression tests. Any product surface relying on default fallbacks or zero-valued settings (0 as a legitimate value — quotas, limits, toggles, prices, counters) was exposed; this release closes that hole.provider(?string $name = null) explicitly nullable removes a reproduced PHP 8.4 deprecation without changing accepted inputs — a maintenance-cost reduction that matters when weighing an early move to newer PHP minors.Consider it when:
Look elsewhere, or scope carefully, when:
For executives (one paragraph): We are adopting a small, focused Laravel package for runtime-editable application settings instead of building and maintaining that plumbing ourselves. Version 4.0.0 is primarily a maintenance and correctness release: it fixes two reproducible read bugs on documented code paths, removes a PHP 8.4 deprecation, and materially expands integration tests — while preserving the database schema and the provider/event APIs, so there is no data migration. The breaking change is environmental only: it requires PHP 8.3+ and Laravel 13, and teams on older Laravel stay on 3.x. Net effect: lower build cost, fewer latent setting-read defects, and a clean alignment point with our platform upgrade plan.
For engineering: Treat this as a dependency bump gated on the PHP 8.3 / Laravel 13 upgrade; read UPGRADE.md before moving off 3.x. No schema or provider/event API changes, so rollout risk is low and rollback is a version pin. The Option::get() no-argument and Option::get('0') fixes plus their regression tests mean any code relying on defaults or zero values should be re-verified rather than assumed broken — this release makes those paths correct. Validation is credible: 19 tests / 53 assertions passing on PHP 8.3, 8.4 and 8.5 with highest dependencies, and on 8.3 with lowest secure dependencies, with Pint, Composer validation, platform checks, dependency audits, and security-advisory blocking all enabled.
Ask: approve the version bump as part of the platform-upgrade workstream, and confirm the 3.x pin for any service that cannot move to Laravel 13 yet.
How can I help you explore Laravel packages today?