rithlock/vich-uploader-serialization-bundle
Bridges VichUploaderBundle and Symfony Serializer so uploadable entities can be serialized cleanly in APIs. Adds normalizers and helpers for exposing file URIs, metadata, and upload fields without custom boilerplate, simplifying JSON responses for REST and JSON:API projects.
VichUploaderBundle and JMSSerializerBundle: it registers a serializer handler that calls Vich's UriGeneratorInterface instead of emitting the stored name. That is on the order of 100–200 lines we can own outright. Deciding to depend on it buys us nothing we can't reproduce in under a day, and costs us an unmaintained transitive dependency.Storage facade. For a Laravel-first product this is a reference implementation, not a candidate dependency — the equivalent is an accessor or JsonResource over Storage::url().Consider it only when all of the following hold:
Bundle is Symfony terminology and both upstream dependencies are Symfony-ecosystem) with vich/uploader-bundle and jms/serializer-bundle already installed and pinned.composer why-not / dependency-resolution spike that the bundle's PHP and Symfony constraints actually resolve against our pinned versions — the absence of downstream users means declared constraints are unverified.Look elsewhere — or skip it entirely — when:
Illuminate\Http\UploadedFile, the Storage facade, and JsonResource / APIResource: first-party, maintained, already in the framework. Re-implement the idea, don't import the dependency chain.NormalizerInterface, or adopt API Platform, which handles file uploads first-class and in most designs removes the need for either Vich or JMS Serializer.For executives (one paragraph): This is a small integration shim between two Symfony libraries that makes uploaded files appear as URLs in API responses instead of requiring custom code per entity. It carries no strategic value, is not a platform component, and has effectively zero adoption — no stars, no downstream projects, no maintenance signal. It also does not apply to our Laravel work, where the framework already solves this natively. Recommendation: do not add it as a dependency. If we need the behavior on a Symfony service, we replicate the roughly 100–200 lines of glue ourselves, with tests. The cost of building it is trivial; the cost of depending on it is unmanaged.
For engineering (one paragraph): The bundle wires VichUploaderBundle's URI generation into JMSSerializerBundle via a serializer handler, so a Vich-managed filename property serializes to a resolvable URL rather than a raw stored name. Before adopting: confirm the handler is auto-registered or must be tagged/subscribed manually, check that it covers both Vich namer strategies we use, verify PHP/Symfony constraint ranges and commit recency, and validate output shape and missing-file behavior against current API contracts. If it fits, vendor it into an internal bundle with tests and feature-flag it against the existing handler until parity is proven. On Laravel, disregard entirely — an accessor or JsonResource over Storage::url() is the correct and simpler answer.
Framing to use: "Cheap to replicate, cheap to replace, zero lock-in — so decide on maintenance risk, not on features."
How can I help you explore Laravel packages today?