Skip to content

Normalize column names when filtering them #6918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.10.x
Choose a base branch
from

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 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants