IONOS(search): Fix SearchComposer.php filtering logic#198
Merged
printminion-co merged 7 commits intoionos-devfrom Aug 11, 2025
Merged
IONOS(search): Fix SearchComposer.php filtering logic#198printminion-co merged 7 commits intoionos-devfrom
printminion-co merged 7 commits intoionos-devfrom
Conversation
fd350e4 to
0fbc8d7
Compare
There was a problem hiding this comment.
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
Author
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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