pharaonic/php-dot-array
Pharaonic PHP Dot Array gives you clean dot-notation access to nested arrays: get, set, has, and forget values like config('app.name') for any array. Lightweight, framework-agnostic, and easy to drop into Laravel or plain PHP projects.
Architecture fit
get/set/has/delete, plus wildcard matching). This is a leaf dependency with no framework coupling, no service provider, no config, no migrations — it slots in as a static helper or a small injectable class.Illuminate\Support\Arr::get/set/has/forget and the data_get/data_set/data_fill helpers, which cover dot-notation read/write and (in Arr::has) wildcard checks. Any Laravel-native adoption therefore needs a clear justification: wildcard write/delete semantics, stricter typing, exception behavior, or use outside the framework boundary (queued jobs, shared libraries, non-Laravel services in the same monorepo).illuminate/support), the value proposition is stronger: pulling in the full illuminate/support package for four array helpers is a poor trade against a ~10-star micro-package.Arr::, data_get, and this package's API, cognitive overhead and inconsistent wildcard behavior become a maintenance tax for near-zero functional gain.Integration feasibility
composer require pharaonic/php-dot-array; no publishable assets, no bootstrapping, no environment variables. Integration effort is measured in hours, not sprints.^8.x?), PSR-4 autoload correctness, whether the API is static-only or instance-based, and whether wildcards apply to set/delete or only get/has. These need to be confirmed from the actual source and README before sign-off.Technical risk
delete('a.*.b') do on partially populated nodes?). These need explicit test cases before adoption.Key questions
Arr/data_get cannot? If not, why are we adding a dependency?null/default on missing paths?set and delete, and how are dotted literal keys escaped?Stack fit
Arr does not offer.Arr::get/Arr::set already cover 100% of the need. Introducing it there is unnecessary dependency surface.Migration path
composer.json (avoid ^ while the package is pre-1.0 or thinly maintained), commit composer.lock, and add a composer audit / Dependabot hook.App\Support\ArrayAccess) that delegates to the package. This is the single most important step — it converts an external dependency into an internal interface we control, so swapping to Arr or a vendored fork is a one-file change.Arr:: calls. Replace existing helpers only where the package demonstrably improves behavior (wildcard deletes, typed returns).Arr:: or the package facade") and add a lint/architecture rule if feasible.Compatibility
Pharaonic\...) with existing packages from the same vendor; several pharaonic/laravel-* packages exist and may pull shared dependencies.illuminate/support-coupled alternatives.Sequencing
Total realistic effort: under one engineering week. That is the ceiling on this decision — it should not consume architecture-review bandwidth beyond a lightweight ADR.
Maintenance
Support
Scaling
delete('*.*.id') over a 100k-element payload is a CPU and memory spike, not a correctness bug but an operational one. Ban wildcard writes in request-critical paths via code review.Failure modes
null or silently no-op'ing can mask configuration errors. Mitigate by requiring explicit defaults at call sites and asserting on has() where absence is a bug.Ramp-up
Bottom line for the TPM: this is a low-cost, low-risk, low-value decision. Approve it only as a scoped, adapter-wrapped utility in framework-agnostic code where Arr is unavailable or insufficient; reject it as a general replacement for Laravel's native array helpers. The dominant risk is not technical failure — it is adopting an unowned micro-dependency for convenience and inheriting long-term governance overhead disproportionate to the functionality gained.
How can I help you explore Laravel packages today?