refactor: Remove deprecated AutoCompleteEvent

No longer used.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
pull/60643/head
Carl Schwan 3 months ago committed by Côme Chilliet
parent 4c6244d997
commit 30b173765e
  1. 16
      build/psalm-baseline.xml
  2. 15
      core/Controller/AutoCompleteController.php
  3. 2
      core/openapi-full.json
  4. 2
      core/openapi.json
  5. 1
      lib/composer/composer/autoload_classmap.php
  6. 1
      lib/composer/composer/autoload_static.php
  7. 84
      lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php
  8. 2
      openapi.json

@ -3092,22 +3092,6 @@
<code><![CDATA[IToken::PERMANENT_TOKEN]]></code>
</DeprecatedClass>
</file>
<file src="core/Controller/AutoCompleteController.php">
<DeprecatedClass>
<code><![CDATA[new AutoCompleteEvent([
'search' => $search,
'results' => $results,
'itemType' => $itemType,
'itemId' => $itemId,
'sorter' => $sorter,
'shareTypes' => $shareTypes,
'limit' => $limit,
])]]></code>
</DeprecatedClass>
<DeprecatedMethod>
<code><![CDATA[dispatch]]></code>
</DeprecatedMethod>
</file>
<file src="core/Controller/ClientFlowLoginV2Controller.php">
<TypeDoesNotContainType>
<code><![CDATA[!is_string($stateToken)]]></code>

@ -15,7 +15,6 @@ use OCP\AppFramework\Http\Attribute\ApiRoute;
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 @@ class AutoCompleteController extends OCSController {
* @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<int> $shareTypes Types of shares to search for
* @param int $limit Maximum number of results to return
*
@ -58,18 +57,6 @@ class AutoCompleteController extends OCSController {
// 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,

@ -1940,7 +1940,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,

@ -1940,7 +1940,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,

@ -248,7 +248,6 @@ return array(
'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',

@ -289,7 +289,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',

@ -1,84 +0,0 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Collaboration\AutoComplete;
use OCP\EventDispatcher\GenericEvent;
/**
* @since 16.0.0
* @deprecated 28.0.0 Use {@see AutoCompleteFilterEvent} instead
*/
class AutoCompleteEvent extends GenericEvent {
/**
* @param array $arguments
* @since 16.0.0
*/
public function __construct(array $arguments) {
parent::__construct(null, $arguments);
}
/**
* @since 16.0.0
*/
public function getResults(): array {
return $this->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');
}
}

@ -5602,7 +5602,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,

Loading…
Cancel
Save