-
Couldn't load subscription status.
- Fork 3
IONOS(search): Fix SearchComposer.php filtering logic #198
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
Conversation
fd350e4 to
0fbc8d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the filtering logic in SearchComposer.php to properly maintain the provider types and handler associations when filtering providers based on the 'unified_search.providers_allowed' configuration.
- Refactors the
filterProvidersmethod to modify provider arrays in place instead of returning a filtered array - Updates method signature and documentation to reflect the change from returning filtered data to modifying instance variables
- Adds comprehensive test coverage for the filtering functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/private/Search/SearchComposer.php | Refactors filterProviders method to maintain provider types by filtering in place and also removing corresponding handlers |
| tests/lib/Search/SearchComposerTest.php | Adds comprehensive test suite covering provider filtering, sorting, and various edge cases |
0fbc8d7 to
e64c605
Compare
|
Cherry-picked commits from approved PR nextcloud#54120 |
keep the $this->providers types Test via ./occ config:app:set --value '["files","settings"]' --type array core unified_search.providers_allowed should be part of 8e57004 Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
…e providers Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
…d providers restriction and empty configuration Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
…rder values Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
e64c605 to
44d0d95
Compare
keep the $this->providers types
TODO
Test via
./occ config:app:set --value '["files","settings"]' --type array core unified_search.providers_allowedTests can be executed via
composer run test -- tests/lib/Search/SearchComposerTest.phpChecklist