From c026a7ac17d1aa8e0a593e596bbc0ea960c33f37 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 21 May 2026 16:15:38 +0200 Subject: [PATCH] refactor: Remove deprecated AutoCompleteEvent No longer used. Signed-off-by: Carl Schwan --- build/psalm-baseline.xml | 16 ---- core/Controller/AutoCompleteController.php | 15 +--- core/openapi-full.json | 2 +- core/openapi.json | 2 +- lib/composer/composer/autoload_classmap.php | 1 - lib/composer/composer/autoload_static.php | 1 - .../AutoComplete/AutoCompleteEvent.php | 84 ------------------- openapi.json | 2 +- 8 files changed, 4 insertions(+), 119 deletions(-) delete mode 100644 lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index fe478aab69d41..ddb024ed9e05c 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -3101,22 +3101,6 @@ - - - $search, - 'results' => $results, - 'itemType' => $itemType, - 'itemId' => $itemId, - 'sorter' => $sorter, - 'shareTypes' => $shareTypes, - 'limit' => $limit, - ])]]> - - - - - diff --git a/core/Controller/AutoCompleteController.php b/core/Controller/AutoCompleteController.php index e73ea1a137760..786996c694fce 100644 --- a/core/Controller/AutoCompleteController.php +++ b/core/Controller/AutoCompleteController.php @@ -15,7 +15,6 @@ use OCP\AppFramework\Http\Attribute\NoAdminRequired; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCSController; -use OCP\Collaboration\AutoComplete\AutoCompleteEvent; use OCP\Collaboration\AutoComplete\AutoCompleteFilterEvent; use OCP\Collaboration\AutoComplete\IManager; use OCP\Collaboration\Collaborators\ISearch; @@ -43,7 +42,7 @@ public function __construct( * @param string $search Text to search for * @param string|null $itemType Type of the items to search for * @param string|null $itemId ID of the items to search for - * @param string|null $sorter can be piped, top prio first, e.g.: "commenters|share-recipients" + * @param string|null $sorter can be piped, top priority first, e.g.: "commenters|share-recipients" * @param list $shareTypes Types of shares to search for * @param int $limit Maximum number of results to return * @@ -58,18 +57,6 @@ public function get(string $search, ?string $itemType, ?string $itemId, ?string // result from search() – thus nothing else to do here. [$results,] = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0); - $event = new AutoCompleteEvent([ - 'search' => $search, - 'results' => $results, - 'itemType' => $itemType, - 'itemId' => $itemId, - 'sorter' => $sorter, - 'shareTypes' => $shareTypes, - 'limit' => $limit, - ]); - $this->dispatcher->dispatch(IManager::class . '::filterResults', $event); - $results = $event->getResults(); - $event = new AutoCompleteFilterEvent( $results, $search, diff --git a/core/openapi-full.json b/core/openapi-full.json index 0164fbaef7a56..f96d41f56e08b 100644 --- a/core/openapi-full.json +++ b/core/openapi-full.json @@ -1936,7 +1936,7 @@ { "name": "sorter", "in": "query", - "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"", + "description": "can be piped, top priority first, e.g.: \"commenters|share-recipients\"", "schema": { "type": "string", "nullable": true, diff --git a/core/openapi.json b/core/openapi.json index 145894f33a0b5..0854dc184fcec 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -1936,7 +1936,7 @@ { "name": "sorter", "in": "query", - "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"", + "description": "can be piped, top priority first, e.g.: \"commenters|share-recipients\"", "schema": { "type": "string", "nullable": true, diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index f7fae7cc4126d..bc301456d72a2 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -247,7 +247,6 @@ 'OCP\\Capabilities\\ICapability' => $baseDir . '/lib/public/Capabilities/ICapability.php', 'OCP\\Capabilities\\IInitialStateExcludedCapability' => $baseDir . '/lib/public/Capabilities/IInitialStateExcludedCapability.php', 'OCP\\Capabilities\\IPublicCapability' => $baseDir . '/lib/public/Capabilities/IPublicCapability.php', - 'OCP\\Collaboration\\AutoComplete\\AutoCompleteEvent' => $baseDir . '/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php', 'OCP\\Collaboration\\AutoComplete\\AutoCompleteFilterEvent' => $baseDir . '/lib/public/Collaboration/AutoComplete/AutoCompleteFilterEvent.php', 'OCP\\Collaboration\\AutoComplete\\IManager' => $baseDir . '/lib/public/Collaboration/AutoComplete/IManager.php', 'OCP\\Collaboration\\AutoComplete\\ISorter' => $baseDir . '/lib/public/Collaboration/AutoComplete/ISorter.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 1a56116c3b37c..11b4e3661455b 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -288,7 +288,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OCP\\Capabilities\\ICapability' => __DIR__ . '/../../..' . '/lib/public/Capabilities/ICapability.php', 'OCP\\Capabilities\\IInitialStateExcludedCapability' => __DIR__ . '/../../..' . '/lib/public/Capabilities/IInitialStateExcludedCapability.php', 'OCP\\Capabilities\\IPublicCapability' => __DIR__ . '/../../..' . '/lib/public/Capabilities/IPublicCapability.php', - 'OCP\\Collaboration\\AutoComplete\\AutoCompleteEvent' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php', 'OCP\\Collaboration\\AutoComplete\\AutoCompleteFilterEvent' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/AutoCompleteFilterEvent.php', 'OCP\\Collaboration\\AutoComplete\\IManager' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/IManager.php', 'OCP\\Collaboration\\AutoComplete\\ISorter' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/ISorter.php', diff --git a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php deleted file mode 100644 index 44826403a5a97..0000000000000 --- a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php +++ /dev/null @@ -1,84 +0,0 @@ -getArgument('results'); - } - - /** - * @param array $results - * @since 16.0.0 - */ - public function setResults(array $results): void { - $this->setArgument('results', $results); - } - - /** - * @since 16.0.0 - */ - public function getSearchTerm(): string { - return $this->getArgument('search'); - } - - /** - * @return int[] - * @since 16.0.0 - */ - public function getShareTypes(): array { - return $this->getArgument('shareTypes'); - } - - /** - * @since 16.0.0 - */ - public function getItemType(): string { - return $this->getArgument('itemType'); - } - - /** - * @since 16.0.0 - */ - public function getItemId(): string { - return $this->getArgument('itemId'); - } - - /** - * @since 16.0.0 - */ - public function getSorter(): string { - return $this->getArgument('sorter'); - } - - /** - * @since 16.0.0 - */ - public function getLimit(): int { - return $this->getArgument('limit'); - } -} diff --git a/openapi.json b/openapi.json index ba4ee767a4b16..6becd39a02acd 100644 --- a/openapi.json +++ b/openapi.json @@ -5594,7 +5594,7 @@ { "name": "sorter", "in": "query", - "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"", + "description": "can be piped, top priority first, e.g.: \"commenters|share-recipients\"", "schema": { "type": "string", "nullable": true,