mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #11666] Auto-detect values for EnumType columns #13171
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/11666
State: closed
Merged: Yes
Follow-up to #11657, leverages doctrine/dbal#6536.
This PR allows us to detect the
enumTypeandoptions.valuessettings for a typed property withtype: Types::ENUM.Before:
After:
Note that the
type: Types::ENUMpart is still required if we want to have an actualENUMcolumn in MySQL/MariaDB. We still default toTypes::STRINGorTYPES::INTEGERfor columns types with a PHP enum as this is the more portable solution and the safer default.