Skip to content

Conversation

Numynum
Copy link

@Numynum Numynum commented Apr 17, 2025

This fixes Table::getColumns not returning columns in their documented order (PK > FK > rest).
Fixes #4158

This fixes Table::getColumns not returning columns in their documented order (PK > FK > rest).
Fixes doctrine#4158
Comment on lines +69 to +71
self::assertSame($columns[2], $orderedColumns[0]);
self::assertSame($columns[1], $orderedColumns[1]);
self::assertSame($columns[0], $orderedColumns[2]);
Copy link
Member

@morozov morozov May 4, 2025

Choose a reason for hiding this comment

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

I'm sorry, these assertions are impossible to comprehend. What are you trying to achieve?

Regardless, the behavior of returning table columns in a non-natural order was deprecated in #4789 and removed in #4777. Instead of relying on the behavior that's going to change during the upgrade, you may want to make your code not rely on the deprecated behavior.

Copy link
Author

Choose a reason for hiding this comment

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

My goal was to fix the inconsistent behavior seen in #4158
But I guess that will become moot if the (bugged) ordering is removed altogether 🤔

Copy link

github-actions bot commented Aug 4, 2025

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Aug 4, 2025
@Numynum Numynum closed this Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants