raksul/doctrine-set-type-bundle
A Symfony bundle that provides a Doctrine DBAL type for MySQL SET columns, enabling entities to map set-valued database fields to PHP arrays and simplifying Doctrine ORM integration for applications that rely on MySQL SET types.
SET columns to a Doctrine type, so teams can bring an existing MySQL schema under Doctrine entity management without rewriting tables. This unblocks "modernize the app on Doctrine/Symfony" initiatives where changing the schema is too expensive or risky.*_flags join table or JSON column. The decision hinges on whether the team wants an external dependency for something this small.SET usage (the SET type is a MySQL-specific, non-portable construct), this package buys time — it lets you freeze legacy columns while new features use normalized types, deferring the schema rewrite to a later milestone.Consider it when:
SET columns and a Symfony application using Doctrine ORM, and you need entity mappings for those columns quickly.Look elsewhere (or build in-house) when:
array Doctrine type instead. MySQL SET is a legacy construct and blocks database portability.doctrine/migrations handles SET columns correctly with this type before relying on it.For executives: This is a small, MIT-licensed Symfony bundle that lets our application read and write existing MySQL SET columns through Doctrine, the ORM our PHP stack uses. It is not a platform bet — it's a tactical compatibility shim. The strategic value is that it lets us modernize application code and adopt Doctrine without a risky, schedule-disrupting database migration in the same release. The trade-off is a low-adoption, single-purpose dependency (no meaningful community, last release mid-2023), so the recommendation is to treat it as a starting point we own — vendor it or reimplement it in-house (low effort) — and keep a roadmap item to eliminate MySQL-specific SET columns over time. Net: low cost, contained risk, unblocks a larger modernization effort, and preserves an exit path to database portability.
For engineering: This bundle registers a Doctrine DBAL type so SET columns hydrate into entities as expected and Symfony wires it automatically. It's small enough to audit in an afternoon. Before adoption, verify PHP/Doctrine ORM 3/DBAL 4 compatibility, add tests around round-tripping and schema diffing with doctrine/migrations, and confirm behavior on writes to non-existent set members. If any of that is friction, the fallback is a short custom Type subclass plus a config entry — roughly equivalent effort with no external dependency. Recommendation: prototype against a real SET column, time-box the evaluation, and default to in-house implementation or schema normalization if the package shows any incompatibility.
How can I help you explore Laravel packages today?