mhujer/jms-serializer-uuid-bundle
Symfony bundle that integrates ramsey/uuid with JMS Serializer, registering handlers to serialize and deserialize UUID objects—including uuid-doctrine types—so your JSON APIs handle UUIDs cleanly without custom visitors.
Ramsey\Uuid\Uuid value objects go out as strings and come back in as value objects, without per-endpoint casting.Consider adopting (or, more likely, vendoring) it when:
ramsey/uuid, pinned to PHP 5.6/7.0-era dependencies.Look elsewhere when:
jms/serializer already ships UUID support.ramsey/uuid majors or UUID v6/v7.BINARY(16) storage mapping — out of scope here.For executives: This is a tiny, MIT-licensed adapter that makes UUIDs appear as clean strings in our API payloads instead of leaking internal object structure. It is not a platform bet — the whole capability is a few dozen lines, so there is no vendor lock-in and essentially no cost. The caveat is that it has been archived and unmaintained since 2016. Our recommendation is therefore to implement the equivalent handler in-house (roughly a day of engineering) or confirm our serializer already supports UUIDs, rather than adding an unmaintained package to the production dependency inventory.
For engineering: It registers a JMS Serializer handler so Ramsey\Uuid\Uuid serializes to a canonical string and deserializes back into a value object, eliminating manual (string) casts and accidental object-graph leakage at the DTO layer. Functionally it is an integration shim, not a library. Given the archive status and the zero-dependent, low-star signal, treat the repo as a reference implementation: reproduce the handler and its service registration inside our own codebase, where we can test it against current PHP and ramsey/uuid versions and keep the serialization contract under our own ownership and change control.
How can I help you explore Laravel packages today?