idci/simple-metadata-bundle
A small Symfony bundle for attaching simple metadata to your objects, letting you store extra key-value data alongside entities without schema changes. Lightweight and easy to wire into existing projects, though it has minimal adoption and may need review before production use.
metadata table, a HasMetadata trait, a cast/serializer, a service provider — is 1–3 engineering days. Adopting, adapting, and eventually forking an abandoned bundle costs more than writing it.ServiceProvider, no facade, no publishable config. Adopting it would mean reimplementing the DI wiring, Doctrine entity hooks, and configuration loading in Eloquent terms — at which point we have written it ourselves anyway.Adoption criteria — all of which would have to hold at once:
Look elsewhere — or build — when:
spatie/laravel-schemaless-attributes, or a small polymorphic metadata table plus a HasMetadata trait. All are better supported and better documented.For executives: There is a real product question here — should customers and integration partners be able to attach their own attributes to our records? That deserves a roadmap slot. The package does not. It is a two-star, zero-dependent Symfony2 bundle built for a framework version that has been end-of-life for roughly seven years, and it is not a Laravel package in any case. Recommending it would create a permanent maintenance obligation with no upstream support and no community, on a stack we do not run. The one clean positive is the MIT license, which makes reading and reusing the pattern legally unencumbered.
For engineering: Treat it as a design reference, not a dependency. The pattern — a metadata side table keyed by entity type and ID, plus a trait for get/set — is worth 1–3 days of native implementation using primitives we already have: a metadata table with a composite index on (metable_type, metable_id, key), a Metadata model with a morph-to relationship, a HasMetadata trait exposing setMetadata/getMetadata/scopeWhereMetadata, and a service provider for config and migrations. That gives us indexing control, type fidelity, migration safety, and tenant-scoped validation the bundle never offers. Before building, spend four hours reading the source to see whether any non-trivial logic (typed value coercion, inheritance handling, schema validation) is worth porting under MIT — budget 3–10 days if we fork and adapt, and assume we own the fork forever. Design the query patterns first, because "find all records where metadata X = Y" is the requirement that decides the schema, not the library.
Recommendation: No-go on the dependency. Keep the capability in discovery pending a concrete customer requirement, size an internal spike at half a day, and default the build decision to a small in-house package with a named owner.
How can I help you explore Laravel packages today?