serendipity_hq/component-array-writer
Serendipity HQ's component-array-writer is a lightweight PHP utility for exporting arrays into clean, readable PHP files. It simplifies generating configuration, data dumps, and component registries in Laravel or any PHP project, with simple, dependable, human-friendly output.
<?php return [...]) rather than hold them in memory. That is a real decision for config-generation workflows: installer/bootstrap wizards, per-tenant settings export, admin UI writing to config/*.php, and package scaffolding. It is the wrong tool for in-request array manipulation.var_export() output is unreadable. If none of these is on the roadmap, the package is out of scope by default.Consider it when:
var_export().Arr/Config helpers.Look elsewhere when:
config(), Config::set(), Arr::get/set/dot, and Illuminate\Support\Arr cover nearly all of this. Prefer first-party.symfony/var-exporter; for AST-level fidelity, nikic/php-parser.Executives: This is a micro-utility, not a platform decision. It does not unlock a capability we lack, remove meaningful cost, or affect roadmap timing. Recommendation: do not add it as a dependency. If the need appears, we implement it in-house in under a day or use Symfony's maintained equivalent. No budget ask, no schedule impact — it is logged as "considered and rejected" so it does not resurface in future build-vs-buy reviews.
Engineering: The package is a thin read/write layer for <?php return [...] files. It is only relevant when config files are a generated artifact. In Laravel we already have config(), Arr, and Config::set for reads/mutation, and should use var_export() plus CS-Fixer or symfony/var-exporter for emission. With one star and no dependents there is no security or upgrade path; copying the MIT-licensed source is lower risk than a Composer entry. If we do adopt it, pin the version, wrap it behind an internal interface, and add a round-trip test against our real config fixtures before it touches production paths.
How can I help you explore Laravel packages today?