okapon/doctrine-set-type-bundle
Symfony bundle that adds a Doctrine DBAL type for MySQL SET columns, letting you map SET fields to PHP arrays instead of comma-separated strings. Includes schema support and simple configuration for legacy or MySQL-specific databases that rely on SET values.
SET; it assumes Symfony DI, bundle bootstrapping, and Doctrine2 ORM. Laravel’s default persistence is Eloquent, and even Laravel Doctrine integrations do not consume Symfony bundles directly.laravel-doctrine/orm, but this bundle would still need a Laravel service provider or a fork that registers the DBAL type manually. The useful core is small—the SET type mapping—so reimplementing it as an application-level Doctrine type or Eloquent cast is likely simpler than integrating the bundle.SET is also a legacy, MySQL-specific column type with limited portability.SET truly required, or can the data be modeled as JSON, a normalized join table, ENUM, or a bitmask? Are we already using Doctrine in Laravel, or is this an Eloquent product? Which Doctrine DBAL/PHP versions must be supported? Can we own a small custom type instead of a stale bundle? What is the migration cost if we replace SET later?SET columns can be created via raw migrations, but Eloquent has no first-class SET cast; a custom cast or accessor/mutator would be needed. If using Doctrine in Laravel, register a custom DBAL type directly rather than adopting a Symfony bundle.SET, first assess whether it can be migrated to JSON or a normalized model. If SET must remain, implement a small custom Doctrine DBAL type in application code or an Eloquent custom cast, with explicit tests for read/write, schema introspection, and migrations. Fork the bundle only if its type logic is reused, then strip Symfony-specific configuration.SET is a hard requirement. 2) Prototype a custom DBAL type or Eloquent cast in a branch. 3) Validate MySQL SET behavior: storage, ordering, strict mode, schema diff, and query patterns. 4) If adopting the bundle, fork and replace Symfony wiring with a Laravel service provider. 5) Plan data migration if moving away from SET. 6) Deprecate the bundle dependency once the custom type is stable.SET semantics.SET is a bitmask limited to 64 distinct values and is not portable across databases. Queries using FIND_IN_SET are generally non-sargable and can become a performance bottleneck. A normalized join table or JSON column scales better for evolving multi-value attributes.SET; strict SQL mode can reject invalid values; ordering and truncation semantics can cause silent data issues; hydration may return unexpected strings or arrays.SET expertise. A TPM should budget a short spike and likely recommend avoiding the bundle in favor of a small, owned integration or a schema redesign.How can I help you explore Laravel packages today?