Skip to content

[DoctrineBridge] Fix deprecation with doctrine/dbal ^4.3#59798

Merged
nicolas-grekas merged 1 commit intosymfony:6.4from
alexandre-daubois:deprec-dbal-4.3.x
Feb 18, 2025
Merged

[DoctrineBridge] Fix deprecation with doctrine/dbal ^4.3#59798
nicolas-grekas merged 1 commit intosymfony:6.4from
alexandre-daubois:deprec-dbal-4.3.x

Conversation

@alexandre-daubois
Copy link
Copy Markdown
Member

Q A
Branch? 6.4
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

Fixes deprecations raised by doctrine/dbal#6787.

@nicolas-grekas
Copy link
Copy Markdown
Member

Thank you @alexandre-daubois.

@nicolas-grekas nicolas-grekas merged commit 5c66fcc into symfony:6.4 Feb 18, 2025
@stof
Copy link
Copy Markdown
Member

stof commented Feb 18, 2025

@alexandre-daubois shouldn't this be solved at the ORM level instead so that this join column annotation stays optional ?

@alexandre-daubois
Copy link
Copy Markdown
Member Author

alexandre-daubois commented Feb 18, 2025

@stof I'm not sure. OneToOne relations are nullable so this deprecation makes sense when a OneToOne is used as a primary key. It forces to set it explicitly as not nullable.

Dealing with this at ORM level would mean making OneToOne implicitly not-nullable when used as identity columns if I understand correctly, which doesn't seem ideal as it brings "inconsistent" behavior on OneToOne columns I would say?

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.

4 participants