Skip to content

Forward compatibility layer for AbstractPlatform::getColumnDeclarationListSQL() #7074

@derrabus

Description

@derrabus

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:

* @phpstan-type ColumnProperties = array{
* name: string,

5.0.x:

* @phpstan-type ColumnProperties = array{
* name: UnqualifiedName,

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions