Skip to content

Conversation

@morozov
Copy link
Member

@morozov morozov commented Oct 13, 2025

This is a prerequisite for fixing #7194. DefaultExpression can be used to represent column default expressions in a portable way. Subsequently, we can use the same interface to represent literal expressions (strings, numbers, etc.).

Backward compatibility

In theory, using objects instead of strings may impact schema comparison: the column definition obtained via schema introspection will still contain a string representing the default expression, not the DefaultExpression object. In practice, it shouldn’t be a problem because column definitions are compared as their DDL:

if (
$this->getColumnDeclarationSQL('', $column1Array)
!== $this->getColumnDeclarationSQL('', $column2Array)
) {
return false;
}

@greg0ire
Copy link
Member

it should be a problem

Ah that's too bad 😛

@morozov
Copy link
Member Author

morozov commented Oct 13, 2025

Ah that's too bad 😛

Fixed 🫣

@morozov morozov merged commit 5e7a0c4 into doctrine:4.4.x Oct 13, 2025
96 checks passed
@morozov morozov deleted the default-expression branch October 13, 2025 12:04
@morozov morozov added this to the 4.4.0 milestone Oct 13, 2025
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Nov 9, 2025
This addresses the deprecation introduced in
doctrine/dbal#7195

A follow-up should be to deprecate not using these value objects in
field mappings, so that we do not just reproduce the same checks that
the DBAL wants to remove.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Nov 9, 2025
This addresses the deprecation introduced in
doctrine/dbal#7195

A follow-up should be to deprecate not using these value objects in
field mappings, so that we do not just reproduce the same checks that
the DBAL wants to remove.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Nov 9, 2025
This addresses the deprecation introduced in
doctrine/dbal#7195

A follow-up should be to deprecate not using these value objects in
field mappings, so that we do not just reproduce the same checks that
the DBAL wants to remove.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Nov 9, 2025
This addresses the deprecation introduced in
doctrine/dbal#7195

A follow-up should be to deprecate not using these value objects in
field mappings, so that we do not just reproduce the same checks that
the DBAL wants to remove.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Nov 9, 2025
This addresses the deprecation introduced in
doctrine/dbal#7195

A follow-up should be to deprecate not using these value objects in
field mappings, so that we do not just reproduce the same checks that
the DBAL wants to remove.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Nov 10, 2025
This addresses the deprecation introduced in
doctrine/dbal#7195

A follow-up should be to deprecate not using these value objects in
field mappings, so that we do not just reproduce the same checks that
the DBAL wants to remove.
greg0ire added a commit to greg0ire/doctrine-orm that referenced this pull request Nov 10, 2025
This addresses the deprecation introduced in
doctrine/dbal#7195

A follow-up should be to deprecate not using these value objects in
field mappings, so that we do not just reproduce the same checks that
the DBAL wants to remove.
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.

2 participants