Skip to content
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

[temp/ai test 🤖] Apply default sort when all provided sort parameters are invalid #945

Closed
wants to merge 2 commits into from

Conversation

AlexVanderbist
Copy link
Member

@AlexVanderbist AlexVanderbist commented May 31, 2024

Implements default sorting behavior when all provided sort parameters are invalid, ensuring the query builder falls back to a predefined default sort order.

  • Default Sort Application: Modifies addRequestedSortsToQuery in src/Concerns/SortsQuery.php to apply the default sort when no valid sorts are present in the request. This ensures that if all provided sort parameters are invalid, the query builder will use the default sort order specified.
  • Test Coverage: Adds a new test case in tests/SortTest.php to verify that the default sort is correctly applied when an invalid sort parameter is provided in the request. This test ensures the functionality works as expected and the default sorting is enforced in such scenarios.

For more details, open the Copilot Workspace session.

@AlexVanderbist AlexVanderbist deleted the AlexVanderbist/fix-default-sort branch May 31, 2024 09:52
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.

1 participant