Adds ENUM type support for Doctrine ORM in Symfony applications, enabling type-safe enumerated values in databases.
DoctrineEnumBundle is a Symfony bundle that adds ENUM type support to Doctrine ORM, allowing developers to map database ENUM columns to PHP enum classes. It solves the problem of managing enumerated values in databases by providing type-safe ENUM definitions with seamless integration into Symfony forms, templates, and migrations.
Symfony developers building applications with Doctrine ORM who need to use ENUM types in their database schemas and want type-safe enum handling in PHP.
Developers choose DoctrineEnumBundle because it provides a standardized, integrated solution for ENUMs in Symfony, eliminating manual mapping boilerplate and ensuring consistency across database, PHP code, and user interfaces.
📦 Provides support of ENUM type for Doctrine in Symfony applications.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports PostgreSQL, SQLite, MySQL, and MSSQL, allowing consistent ENUM handling across different database platforms without vendor lock-in.
Automatically generates Symfony form types from ENUM classes, reducing manual form field definition boilerplate as documented in the 'Building the form' guide.
Provides Twig filters and functions to display readable ENUM values in templates, eliminating custom logic for frontend rendering as shown in the template helpers documentation.
Integrates with Doctrine Migrations for automated schema updates when ENUM definitions change, ensuring smooth database evolution without manual SQL.
Requires specific versions of PHP, Symfony, and Doctrine Bundle per the compatibility table, which can complicate upgrades and maintenance in legacy or mixed-version projects.
Features are split into multiple markdown files (e.g., NULL values, default value), making it harder to get a holistic view compared to a single, comprehensive guide.
Best for static enumerated values; not suited for dynamic ENUMs that need frequent runtime changes, as it relies on predefined PHP classes and database schemas.