acelaya / doctrine-enum-type

A custom Doctrine type that maps column values to enum objects using myclabs/php-enum
MIT License
132 stars 15 forks source link

Support Int or Other Doctrine Types #22

Closed Tigerman55 closed 6 years ago

Tigerman55 commented 6 years ago

Do you think it would be useful to have the ability to have an optional parameter when you register the enum type specifying the doctrine field type and change the doctrine type corresponding to that so that it is not always varchar 255? I have enum values that would work perfect with just being tinyint or int in the database.

acelaya commented 6 years ago

It is already possible to override that: https://github.com/acelaya/doctrine-enum-type#customize-sql-declaration

The varchar(255) declaration is just for convenience.