Skip to content

Fix enumType handling in Column#7238

Merged
morozov merged 1 commit intodoctrine:4.4.xfrom
VincentLanglet:enumType
Dec 5, 2025
Merged

Fix enumType handling in Column#7238
morozov merged 1 commit intodoctrine:4.4.xfrom
VincentLanglet:enumType

Conversation

@VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Dec 3, 2025

Q A
Type bug
Fixed issues

Summary

cc @morozov since you made #6975 and #6945

With the deprecation/remove of hasPlatformOption/getPlatformOption in favor of specific getter. I feel like some getter (and editor method) are missing. (But maybe I'm misunderstand something ?)

Which means

  • a call like $column->getPlatformOption('enumType') has currently no replacement
  • editing a column is loosing extra platform options like enumType

The enumType platformOption is set when using something like

#[ORM\Column(name: 'foo', type: Types::STRING, enumType: Foo::class)]

and there is maybe more similar options...

I'm personally implementing a custom lib which requires to access enumType option from a Column and this won't be possible in 5.x without any changes.

@morozov
Copy link
Member

morozov commented Dec 3, 2025

@VincentLanglet yes, the support for enumType is indeed missing. While introducing the new API in #6945, I was using ColumnProperties and the test suite as a reference, and neither covered it. Thank you for catching the issue.

@VincentLanglet
Copy link
Contributor Author

@VincentLanglet yes, the support for enumType is indeed missing. While introducing the new API in #6945, I was using ColumnProperties and the test suite as a reference, and neither covered it. Thank you for catching the issue.

Great. I'm not familiar with this code. Do you think

  • There is more to do in this PR ?
  • There is other options with the same issues ?

Copy link
Member

@morozov morozov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just need types documented.

@morozov
Copy link
Member

morozov commented Dec 3, 2025

Do you think

  • There is more to do in this PR ?
  • There is other options with the same issues ?

I don't know. If you look at the usage of Column#$_platformOptions, there is no usage of enumType in the codebase (this must be an ORM addition).

@morozov
Copy link
Member

morozov commented Dec 4, 2025

@VincentLanglet please squash the commits. We don't want to see Phpdoc / Fix / Fix in the resulting history.

@VincentLanglet
Copy link
Contributor Author

@VincentLanglet please squash the commits. We don't want to see Phpdoc / Fix / Fix in the resulting history.

Sure, done.
I'm used to "Squash & Merge".

@morozov morozov merged commit c22e72f into doctrine:4.4.x Dec 5, 2025
128 checks passed
@morozov morozov added this to the 4.4.2 milestone Dec 5, 2025
@morozov
Copy link
Member

morozov commented Dec 5, 2025

Thank you, @VincentLanglet.

@VincentLanglet
Copy link
Contributor Author

Hi, any plan for the 4.4.2 release ? :)

@derrabus
Copy link
Member

Here you go: https://github.com/doctrine/dbal/releases/tag/4.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants