DoctrineEnumBundle
Provides support of ENUM type for Doctrine in Symfony applications.
Supported platforms
MySQL | SQLite | PostgreSQL | MSSQL |
---|
Installation
Add dependency via Composer
composer require fresh/doctrine-enum-bundle='~5.1'
Choose the appropriate version if you need
Bundle Version (X.Y.Z) | PHP | Symfony | Doctrine DBAL | Comment |
---|---|---|---|---|
6.0.* | >= 7.1 | >= 4.0 | >= 2.6 | Coming soon |
5.1.* | >= 5.6 | >= 3.2 | >= 2.5 | Actual version |
4.8.* | >= 5.4 | >= 2.6, >= 3.0 | >= 2.2 |
Register the bundle for Symfony2/3
To start using the bundle, register it in app/AppKernel.php
:
public function registerBundles()
{
$bundles = [
// Other bundles...
new Fresh\DoctrineEnumBundle\FreshDoctrineEnumBundle(),
];
}
Using
Features
- NULL values
- Building the form
- Additional methods
- Readable ENUM values in templates
- ENUM constants in templates
- Hook for Doctrine migrations
Contributing
See CONTRIBUTING file.