Skip to content

Conversation

@greg0ire
Copy link
Member

@greg0ire greg0ire commented Aug 8, 2025

It produces no effect.

@greg0ire greg0ire force-pushed the depr-nullable-prim-keys branch from 232d618 to d1d13d5 Compare August 8, 2025 20:23
bool $nullable = true,
bool $unique = false,
string|null $onDelete = null,
string|null $columnDef = null,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to do this change because association mapping overrides use it, and obtained a nullable property set to false.

@greg0ire greg0ire added this to the 3.6.0 milestone Aug 17, 2025
@greg0ire greg0ire merged commit ce844d9 into doctrine:3.6.x Aug 17, 2025
86 checks passed
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
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