epwt/array-jms-serializer-bundle
A Symfony bundle that extends JMSSerializerBundle with an Array format, letting you serialize and deserialize data to and from PHP arrays alongside the formats JMS already supports. A small add-on for projects needing array output within the JMS serialization pipeline.
Serialization boundary choice: array vs. wire format. JMS Serializer's default formats are JSON/XML/YAML. This bundle adds an "array" format so domain objects hydrate directly from, and export to, plain PHP arrays — useful when the data never needs to cross a network boundary in a text encoding. This informs the decision of where to spend serialization cost: skip JSON encode/decode for internal hops (message queues, cache layers, event payloads, DB JSON columns you already decode).
Build vs. buy — and the answer here is mostly "build." The capability is a thin extension over JMSSerializerBundle (a format/visitor registration). At 4 stars, 0 dependents, and README-level maturity, this is better treated as a reference implementation of the pattern than a dependency. The PM decision it enables is: "we want array (de)serialization with our existing JMS metadata; do we vendor this, fork it, or write ~50 lines ourselves?" Realistic effort for in-house is well under a sprint.
Stack-fit veto. The prompt frames this as a Laravel/PHP package, but it is a Symfony bundle (EPWTArrayJMSSerializerBundle, depends on JMSSerializerBundle and the Symfony bundle/kernel registration model). If the product is Laravel, this is a non-starter without an adapter layer — that alone is a roadmap-relevant finding, not a footnote.
Roadmap / legacy-compat input. Any roadmap item touching JMS Serializer 3.x or PHP 8.x should assume this bundle is not covered. It predates and likely conflicts with modern JMS releases; if a migration is planned, budget for replacing this dependency rather than upgrading it.
Concrete use cases worth scoping: fixture and snapshot generation in tests, DTO hydration from already-decoded payloads (config trees, request bodies, cached arrays), and normalizing objects into array shapes for comparison/diffing in test and tooling code.
Consider it only when all of these hold:
composer.json constraint, not the README.Look elsewhere when:
spatie/laravel-data, symfony/serializer, or hand-rolled DTOs with toArray().To executives: This package is a small format adapter that lets our models convert to and from plain PHP arrays instead of JSON, within an established Symfony serialization framework. The capability is genuinely useful for internal data plumbing and test tooling. The package is not investable: 4 stars, zero dependent projects, README-only documentation, and no evidence of maintenance. Recommendation: do not add it as a dependency. If the capability is on our roadmap, we can build the equivalent in roughly a day of engineering and own it outright.
To engineering: Treat this as a design reference, not a library. Read it to see how a JMS format/visitor is registered, then implement the array format in-house against whatever JMS Serializer version we actually run — or skip JMS entirely if the goal is array output for a Laravel or greenfield service. Two specific checks before anyone spends time on it: (1) confirm the target framework really is Symfony, since this is a bundle and the framing as a Laravel package is misleading; (2) confirm the JMS Serializer version constraint supports our runtime, since the project shows no signs of PHP 8 / JMS 3.x adaptation. Expect to fork rather than composer require if we proceed at all.
Bottom line for the roadmap: low priority, low risk to explore, high risk to depend on. Do not put it on the critical path.
How can I help you explore Laravel packages today?