Deprecate specifying nullable on primary key columns#12126
Merged
greg0ire merged 2 commits intodoctrine:3.6.xfrom Aug 17, 2025
Merged
Deprecate specifying nullable on primary key columns#12126greg0ire merged 2 commits intodoctrine:3.6.xfrom
greg0ire merged 2 commits intodoctrine:3.6.xfrom
Conversation
It produces no effect.
232d618 to
d1d13d5
Compare
greg0ire
commented
Aug 8, 2025
| @@ -113,6 +113,10 @@ public function addJoinColumn( | |||
| string|null $onDelete = null, | |||
| string|null $columnDef = null, | |||
Member
Author
There was a problem hiding this comment.
If feels bad to have to specify nullable for this method, but there is no way to widen the type without a breaking change.
| public function addJoinColumn( | ||
| string $columnName, | ||
| string $referencedColumnName, | ||
| bool $nullable = true, |
Member
Author
There was a problem hiding this comment.
This argument is useless, but I'm obliged to add it because of inheritance. I could have widened the type of the parent method, but that would be a breaking change. I wish some of these classes were internal, but marking them as internal now would be a breaking change I guess.
| unset($array['nullable']); | ||
|
|
||
| return $array; | ||
| }; |
Member
Author
There was a problem hiding this comment.
I had to do this change because association mapping overrides use it, and obtained a nullable property set to false.
SenseException
approved these changes
Aug 16, 2025
nicolas-grekas
added a commit
to symfony/symfony
that referenced
this pull request
Aug 18, 2025
…primary key columns (xabbuh) This PR was merged into the 6.4 branch. Discussion ---------- [DoctrineBridge] remove deprecated nullable option from primary key columns | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT see doctrine/orm#12126 Commits ------- 3f2d5d8 remove deprecated nullable option from primary key columns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It produces no effect.