[PR #12108] Address deprecations #13484

Open
opened 2026-01-22 16:17:15 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/12108

State: closed
Merged: Yes


By deprecating the usage of nullable columns as part of a primary key, doctrine/dbal 4.3 points out several bad defaults in the ORM:

  • by default, columns in an n-m table are nullable;
  • by default, columns representing a to-one relationship that are part of a primary key are nullable.

Let us change the minimum amount of bad defaults, while still allowing people to explicitly request a join column be nullable.

On 3.6.x, we should deprecate setting nullable in the above cases, and on 4.0.x, we should throw when that's the case.

**Original Pull Request:** https://github.com/doctrine/orm/pull/12108 **State:** closed **Merged:** Yes --- By [deprecating the usage of nullable columns as part of a primary key](https://github.com/doctrine/dbal/pull/6787), `doctrine/dbal` 4.3 points out several bad defaults in the ORM: - by default, columns in an n-m table are nullable; - by default, columns representing a to-one relationship that are part of a primary key are nullable. Let us change the minimum amount of bad defaults, while still allowing people to explicitly request a join column be nullable. On 3.6.x, we should deprecate setting `nullable` in the above cases, and on 4.0.x, we should throw when that's the case.
admin added the pull-request label 2026-01-22 16:17:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#13484