dbal icon indicating copy to clipboard operation
dbal copied to clipboard

Forward compatibility layer for `AbstractPlatform::getColumnDeclarationListSQL()`

Open derrabus opened this issue 4 months ago • 0 comments

The ORM makes use of the AbstractPlatform::getColumnDeclarationListSQL() method. This method requires a list of column definitions. The structure of that array has been changed in 5.0:

4.3.x: https://github.com/doctrine/dbal/blob/7669f131d43b880de168b2d2df9687d152d6c762/src/Schema/Column.php#L23-L24

5.0.x: https://github.com/doctrine/dbal/blob/711dcecfb36bcc03fa588206b189f1a152e0afaa/src/Schema/Column.php#L22-L23

While the name key is supposed to be a string in 4.3.x, it has to be an UnqualifiedName object in 5.0. I need to be able to write code that is compatible with both versions and while the UnqualifiedName class is already available in 4.3, I cannot use it in this structure yet. Also, there's no deprecation that indicates that the input type will change in a future release.

Should we allow the usage of UnqualifiedNames in 4.x already and trigger a deprecation if we find a string?

derrabus avatar Aug 06 '25 15:08 derrabus