formapro/values
A lightweight Laravel/PHP package for working with typed values and value objects. It provides a clean, expressive API to encapsulate data, validate inputs, and keep domain logic consistent, reusable, and easy to maintain without unnecessary boilerplate.
$value->foo rather than $array['foo']['bar'], so the internal shape can change behind the object.data_get() plus a small internal helper or PHP 8.1 readonly classes cover most of the same ground.Consider it if:
Look elsewhere — strongly — if:
Arr::get / data_get is already there.spatie/laravel-data, webmozart/assert, or native readonly classes and enums are better supported.To executives: This is a small, MIT-licensed utility that makes array data safer to consume by presenting it as an object. It is cheap to trial but effectively unmaintained — last release in 2019 with negligible adoption. The real decision is not "is it good?" but "are we prepared to own it?" Recommendation: treat it as a reference pattern rather than a dependency unless a specific niche (lazy computed configuration) justifies pinning it and, if necessary, forking it.
To engineering: The idea is sound — object ergonomics over arrays, with laziness and path access — but you will be on your own for PHP 8+ compatibility, bug fixes, and security patches. Preferred alternatives: built-in data_get() for reads, native readonly DTOs (8.1+) or spatie/laravel-data for structured values, and a thin internal Value helper if you want the lazy/dot-path behavior. If adopted, hide it behind a small adapter interface so call sites survive a swap.
How can I help you explore Laravel packages today?