jbzoo/data
JBZoo Data is a lightweight PHP library that wraps arrays and objects in a convenient Data class. Access nested values with dot notation, convert between formats, and simplify configuration, JSON, and request data handling in any PHP project.
Architecture fit. jbzoo/data is a framework-agnostic, Composer-installable value-object library that extends ArrayObject to provide a richer collection abstraction (dot-notation access, mutation, validation, format conversion). It carries no Laravel coupling — no service provider, facade, or config publishing — which is both its strength and its limitation. It fits naturally as an internal utility layer for configuration bags, settings objects, normalized request/API payloads, and module-level config, sitting beneath the framework rather than competing with it. The architectural fit is good where teams want a typed, self-validating container instead of passing raw arrays across boundaries.
Integration feasibility. Very high. Adoption is a single composer require with no bootstrapping, no migrations, and no runtime configuration. Because it implements ArrayAccess, IteratorAggregate, Countable, and Serializable via ArrayObject, it is broadly substitutable in existing code paths. A proof of concept can be completed in hours, not sprints.
Technical risk. The dominant risks are supply-chain and organizational, not technical:
Illuminate\Support\Collection, Arr::get(), and data_get() creates a real risk of two competing array paradigms inside one codebase — a consistency cost that compounds over time.Key questions for the vendor/owner.
Arr, Collection, and data_get() do not — enough to justify a second abstraction?Stack fit. Compatible with modern PHP 8.x and current Laravel releases as a plain library. If we want container-managed config bags, a thin application-level service provider binding instances is our own code, not the package's — a small, contained wrapper.
Migration path. Do not attempt a codebase-wide replacement of arrays or Collection. Introduce incrementally in one bounded context where the value is clearest — for example, a settings/config module or an inbound API payload normalizer — and measure whether the validation and conversion features actually earn their keep.
Compatibility. The ArrayObject base makes it a low-friction drop-in for iterable/array-shaped contracts. Watch three areas: JSON serialization output, nested-array mutation semantics, and exception behavior on missing keys, which may differ from Laravel helpers and surprise developers. Confirm behavior in tests rather than assuming parity.
Sequencing.
Arr/Collection equivalents.Maintenance. The package itself is small and low-churn, but dependency maintenance depends entirely on upstream cadence and a narrow maintainer base. Budget for periodic manual review of releases rather than assuming automated dependency tooling will surface semantic changes safely. A documented fork-or-vendor contingency is advisable given bus-factor concerns.
Support. Community-only, no commercial backing, no SLA. Internal ownership must be explicitly assigned; an unowned third-party abstraction layer becomes orphaned code within two or three quarters.
Scaling. Runtime overhead is negligible — these are in-memory collections suited to config-sized payloads. They are not appropriate for large datasets, and repeated format conversion can duplicate memory. No impact on horizontal scaling or infrastructure footprint.
Failure modes.
Ramp-up. Low. PHP developers already comfortable with ArrayObject and Laravel collections will be productive in under a day. The real onboarding cost is convention-setting: teams need a clear rule for when to reach for jbzoo/data versus Collection or Arr, or the codebase will accumulate two idioms for the same job. Treat the guidelines, not the library, as the deliverable.
How can I help you explore Laravel packages today?