]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move AutoComplete::filterResults to new event dispatcher and GenericEvent 21439/head
authorJoas Schilling <coding@schilljs.com>
Tue, 16 Jun 2020 19:14:42 +0000 (21:14 +0200)
committerJoas Schilling <coding@schilljs.com>
Wed, 1 Jul 2020 07:57:33 +0000 (09:57 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
core/Controller/AutoCompleteController.php
lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php
tests/Core/Controller/AutoCompleteControllerTest.php

index aa67ff9a30a769f770f9c0bef51f6fdf673952fa..56ad21f421cf32cb0390cafac391ccf052c80fe1 100644 (file)
@@ -34,17 +34,16 @@ use OCP\AppFramework\OCSController as Controller;
 use OCP\Collaboration\AutoComplete\AutoCompleteEvent;
 use OCP\Collaboration\AutoComplete\IManager;
 use OCP\Collaboration\Collaborators\ISearch;
+use OCP\EventDispatcher\IEventDispatcher;
 use OCP\IRequest;
-use OCP\Share;
 use OCP\Share\IShare;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 
 class AutoCompleteController extends Controller {
        /** @var ISearch */
        private $collaboratorSearch;
        /** @var IManager */
        private $autoCompleteManager;
-       /** @var EventDispatcherInterface */
+       /** @var IEventDispatcher */
        private $dispatcher;
 
        public function __construct(
@@ -52,7 +51,7 @@ class AutoCompleteController extends Controller {
                IRequest $request,
                ISearch $collaboratorSearch,
                IManager $autoCompleteManager,
-               EventDispatcherInterface $dispatcher
+               IEventDispatcher $dispatcher
        ) {
                parent::__construct($appName, $request);
 
index 776bd46d407295a2318ac3dc7d948687dfcf9c7f..73128f618f0bbb98f4b794731d1d2e10de88c1c3 100644 (file)
@@ -26,7 +26,7 @@ declare(strict_types=1);
 
 namespace OCP\Collaboration\AutoComplete;
 
-use Symfony\Component\EventDispatcher\GenericEvent;
+use OCP\EventDispatcher\GenericEvent;
 
 /**
  * @since 16.0.0
index ea62b5021969685f641fad40ef8d35a9a8801bc5..73bc84921135400a6dd7cfa0e4637d6631d62742 100644 (file)
@@ -26,9 +26,9 @@ namespace Tests\Core\Controller;
 use OC\Core\Controller\AutoCompleteController;
 use OCP\Collaboration\AutoComplete\IManager;
 use OCP\Collaboration\Collaborators\ISearch;
+use OCP\EventDispatcher\IEventDispatcher;
 use OCP\IRequest;
 use PHPUnit\Framework\MockObject\MockObject;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 use Test\TestCase;
 
 class AutoCompleteControllerTest extends TestCase {
@@ -36,7 +36,7 @@ class AutoCompleteControllerTest extends TestCase {
        protected $collaboratorSearch;
        /** @var  IManager|MockObject */
        protected $autoCompleteManager;
-       /** @var  EventDispatcherInterface|MockObject */
+       /** @var  IEventDispatcher|MockObject */
        protected $dispatcher;
        /** @var  AutoCompleteController */
        protected $controller;
@@ -48,7 +48,7 @@ class AutoCompleteControllerTest extends TestCase {
                $request = $this->createMock(IRequest::class);
                $this->collaboratorSearch = $this->createMock(ISearch::class);
                $this->autoCompleteManager = $this->createMock(IManager::class);
-               $this->dispatcher = $this->createMock(EventDispatcherInterface::class);
+               $this->dispatcher = $this->createMock(IEventDispatcher::class);
 
                $this->controller = new AutoCompleteController(
                        'core',