Skip to content

Conversation

@printminion-co
Copy link

@printminion-co printminion-co commented Jul 28, 2025

keep the $this->providers types

TODO

Test via

./occ config:app:set --value '["files","settings"]' --type array core unified_search.providers_allowed

Tests can be executed via

 composer run test -- tests/lib/Search/SearchComposerTest.php

Checklist

@printminion-co printminion-co requested a review from Copilot July 28, 2025 15:30

This comment was marked as outdated.

@printminion-co printminion-co force-pushed the mk/dev/fix_search_filter branch 4 times, most recently from fd350e4 to 0fbc8d7 Compare July 31, 2025 14:38
@printminion-co printminion-co requested a review from Copilot July 31, 2025 14:38
Copy link

Copilot AI left a 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 filterProviders method 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

@printminion-co printminion-co force-pushed the mk/dev/fix_search_filter branch from 0fbc8d7 to e64c605 Compare August 5, 2025 10:29
@printminion-co
Copy link
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>
@printminion-co printminion-co force-pushed the mk/dev/fix_search_filter branch from e64c605 to 44d0d95 Compare August 11, 2025 11:01
@printminion-co printminion-co merged commit 455188e into ionos-dev Aug 11, 2025
7 of 16 checks passed
@printminion-co printminion-co deleted the mk/dev/fix_search_filter branch August 11, 2025 11:28
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