Skip to content

Conversation

@morozov
Copy link
Member

@morozov morozov commented Feb 19, 2025

The affected behavior was deprecated in #6787 and #6799.

@morozov morozov added this to the 5.0.0 milestone Feb 19, 2025
@morozov morozov marked this pull request as ready for review February 19, 2025 05:58
@morozov morozov requested a review from greg0ire February 19, 2025 05:59
* @var non-empty-array<string, Identifier>
*/
protected array $_columns = [];
private readonly array $_columns;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this is a good occasion to finally drop these underscores?

Copy link
Member Author

Choose a reason for hiding this comment

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

Initially I did that but then decided to revert. The reasons are:

  1. We already have $_columns and $colums, so the former would have to be renamed to say $columnNames, but then the getter that returns it would still remain named getColumns(), so the code would get a bit inconsistent.
  2. This way, the $isPrimary constructor parameter would get promoted to a property but $isUnique wouldn't, so again, the could would become a bit more inconsistent.

Eventually, all these properties will go away:

  1. $_columns will get removed in favor of $columns.
  2. $_isPrimary will get removed in favor of PrimaryKeyConstraint.
  3. $_isUnique and $_flags will get replaced by some other properties because currently an index can be UNIQUE, FULLTEXT and SPATIAL at the same time, but it doesn't make sense.

@morozov morozov merged commit 9d486a9 into doctrine:5.0.x Feb 19, 2025
63 checks passed
@morozov morozov deleted the index-rework branch February 19, 2025 15:41
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