DoctrineEnumBundle icon indicating copy to clipboard operation
DoctrineEnumBundle copied to clipboard

📦 Provides support of ENUM type for Doctrine in Symfony applications.

DoctrineEnumBundle

📦 Provides ENUM type support for Doctrine in Symfony applications.

Scrutinizer Quality Score Build Status CodeCov License Latest Stable Version Total Downloads StyleCI Gitter

Supported platforms 🧐

PostgreSQL SQLite MySQL MSSQL

Installation 🌱

composer req fresh/doctrine-enum-bundle

Choose the version you need
Bundle Version (X.Y.Z) PHP Symfony Doctrine Bundle Comment
9.0.* >= 8.1.0 6.1 >= 2.6 Current version
8.1.* >= 8.1.0 5.4, 6.0 >= 2.5 Previous version

Check the config/bundles.php file

By default, Symfony Flex will add this bundle to the config/bundles.php file. But in case when you ignored contrib-recipe during bundle installation it would not be added. In this case add the bundle manually:

# config/bundles.php

return [
    // Other bundles...
    Fresh\DoctrineEnumBundle\FreshDoctrineEnumBundle::class => ['all' => true],
    // Other bundles...
];

Usage 🧑‍🎓

  • Example

Features 🎁

  • NULL values
  • Default value
  • Building the form
  • Additional methods
  • Common types
  • Readable ENUM values in templates
  • ENUM constants in templates
  • ENUM values in templates
  • Hook for Doctrine migrations

Contributing 🤝

Read the CONTRIBUTING file.