diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2023-06-19 11:20:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-19 11:20:02 +0200 |
commit | 885dc6373745dbe95173d153c416c322a5eddff2 (patch) | |
tree | 92b472f7c5e98dbebec1d2625069356dea804e25 /apps | |
parent | 59f63a72cb8c7803f9fa433ceac97d7ce35688ac (diff) | |
parent | efb7448cd271f7f0cd21fd284fd1d3f9d729f20f (diff) | |
download | nextcloud-server-885dc6373745dbe95173d153c416c322a5eddff2.tar.gz nextcloud-server-885dc6373745dbe95173d153c416c322a5eddff2.zip |
Merge pull request #38878 from nextcloud/cleanup/controller-service-aliases
Cleanup controller service aliases
Diffstat (limited to 'apps')
-rw-r--r-- | apps/comments/composer/composer/autoload_classmap.php | 2 | ||||
-rw-r--r-- | apps/comments/composer/composer/autoload_static.php | 6 | ||||
-rw-r--r-- | apps/comments/lib/AppInfo/Application.php | 3 | ||||
-rw-r--r-- | apps/comments/lib/Controller/NotificationsController.php (renamed from apps/comments/lib/Controller/Notifications.php) | 6 | ||||
-rw-r--r-- | apps/comments/tests/Unit/AppInfo/ApplicationTest.php | 5 | ||||
-rw-r--r-- | apps/comments/tests/Unit/Controller/NotificationsTest.php | 6 | ||||
-rw-r--r-- | apps/workflowengine/composer/composer/autoload_classmap.php | 2 | ||||
-rw-r--r-- | apps/workflowengine/composer/composer/autoload_static.php | 2 | ||||
-rw-r--r-- | apps/workflowengine/lib/AppInfo/Application.php | 2 | ||||
-rw-r--r-- | apps/workflowengine/lib/Controller/RequestTimeController.php (renamed from apps/workflowengine/lib/Controller/RequestTime.php) | 2 | ||||
-rw-r--r-- | apps/workflowengine/src/components/Checks/request.js | 2 |
11 files changed, 15 insertions, 23 deletions
diff --git a/apps/comments/composer/composer/autoload_classmap.php b/apps/comments/composer/composer/autoload_classmap.php index 6afc14d07a1..61def2ecc46 100644 --- a/apps/comments/composer/composer/autoload_classmap.php +++ b/apps/comments/composer/composer/autoload_classmap.php @@ -14,7 +14,7 @@ return array( 'OCA\\Comments\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', 'OCA\\Comments\\Capabilities' => $baseDir . '/../lib/Capabilities.php', 'OCA\\Comments\\Collaboration\\CommentersSorter' => $baseDir . '/../lib/Collaboration/CommentersSorter.php', - 'OCA\\Comments\\Controller\\Notifications' => $baseDir . '/../lib/Controller/Notifications.php', + 'OCA\\Comments\\Controller\\NotificationsController' => $baseDir . '/../lib/Controller/NotificationsController.php', 'OCA\\Comments\\EventHandler' => $baseDir . '/../lib/EventHandler.php', 'OCA\\Comments\\Listener\\CommentsEntityEventListener' => $baseDir . '/../lib/Listener/CommentsEntityEventListener.php', 'OCA\\Comments\\Listener\\LoadAdditionalScripts' => $baseDir . '/../lib/Listener/LoadAdditionalScripts.php', diff --git a/apps/comments/composer/composer/autoload_static.php b/apps/comments/composer/composer/autoload_static.php index 0f832e1849b..9732ee9f4ca 100644 --- a/apps/comments/composer/composer/autoload_static.php +++ b/apps/comments/composer/composer/autoload_static.php @@ -7,14 +7,14 @@ namespace Composer\Autoload; class ComposerStaticInitComments { public static $prefixLengthsPsr4 = array ( - 'O' => + 'O' => array ( 'OCA\\Comments\\' => 13, ), ); public static $prefixDirsPsr4 = array ( - 'OCA\\Comments\\' => + 'OCA\\Comments\\' => array ( 0 => __DIR__ . '/..' . '/../lib', ), @@ -29,7 +29,7 @@ class ComposerStaticInitComments 'OCA\\Comments\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', 'OCA\\Comments\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php', 'OCA\\Comments\\Collaboration\\CommentersSorter' => __DIR__ . '/..' . '/../lib/Collaboration/CommentersSorter.php', - 'OCA\\Comments\\Controller\\Notifications' => __DIR__ . '/..' . '/../lib/Controller/Notifications.php', + 'OCA\\Comments\\Controller\\NotificationsController' => __DIR__ . '/..' . '/../lib/Controller/NotificationsController.php', 'OCA\\Comments\\EventHandler' => __DIR__ . '/..' . '/../lib/EventHandler.php', 'OCA\\Comments\\Listener\\CommentsEntityEventListener' => __DIR__ . '/..' . '/../lib/Listener/CommentsEntityEventListener.php', 'OCA\\Comments\\Listener\\LoadAdditionalScripts' => __DIR__ . '/..' . '/../lib/Listener/LoadAdditionalScripts.php', diff --git a/apps/comments/lib/AppInfo/Application.php b/apps/comments/lib/AppInfo/Application.php index 527c5d99fc3..bfd66c43ecd 100644 --- a/apps/comments/lib/AppInfo/Application.php +++ b/apps/comments/lib/AppInfo/Application.php @@ -28,7 +28,6 @@ namespace OCA\Comments\AppInfo; use Closure; use OCA\Comments\Capabilities; -use OCA\Comments\Controller\Notifications; use OCA\Comments\EventHandler; use OCA\Comments\Listener\CommentsEntityEventListener; use OCA\Comments\Listener\LoadAdditionalScripts; @@ -58,8 +57,6 @@ class Application extends App implements IBootstrap { public function register(IRegistrationContext $context): void { $context->registerCapability(Capabilities::class); - $context->registerServiceAlias('NotificationsController', Notifications::class); - $context->registerEventListener( LoadAdditionalScriptsEvent::class, LoadAdditionalScripts::class diff --git a/apps/comments/lib/Controller/Notifications.php b/apps/comments/lib/Controller/NotificationsController.php index ba61a0d33cd..41a9541a684 100644 --- a/apps/comments/lib/Controller/Notifications.php +++ b/apps/comments/lib/Controller/NotificationsController.php @@ -38,11 +38,11 @@ use OCP\IUserSession; use OCP\Notification\IManager; /** - * Class Notifications + * Class NotificationsController * * @package OCA\Comments\Controller */ -class Notifications extends Controller { +class NotificationsController extends Controller { protected IRootFolder $rootFolder; protected ICommentsManager $commentsManager; @@ -51,7 +51,7 @@ class Notifications extends Controller { protected IUserSession $userSession; /** - * Notifications constructor. + * NotificationsController constructor. */ public function __construct( string $appName, diff --git a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php index 6e3658c0e5b..a0ec722b368 100644 --- a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php +++ b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php @@ -51,11 +51,8 @@ class ApplicationTest extends TestCase { $app = new Application(); $c = $app->getContainer(); - // assert service instances in the container are properly setup - $s = $c->get('NotificationsController'); - $this->assertInstanceOf('OCA\Comments\Controller\Notifications', $s); - $services = [ + 'OCA\Comments\Controller\NotificationsController', 'OCA\Comments\Activity\Filter', 'OCA\Comments\Activity\Listener', 'OCA\Comments\Activity\Provider', diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php index c21101030e8..4ccb553739b 100644 --- a/apps/comments/tests/Unit/Controller/NotificationsTest.php +++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php @@ -25,7 +25,7 @@ */ namespace OCA\Comments\Tests\Unit\Controller; -use OCA\Comments\Controller\Notifications; +use OCA\Comments\Controller\NotificationsController; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Http\RedirectResponse; use OCP\Comments\IComment; @@ -43,7 +43,7 @@ use OCP\Notification\INotification; use Test\TestCase; class NotificationsTest extends TestCase { - /** @var Notifications */ + /** @var NotificationsController */ protected $notificationsController; /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */ @@ -70,7 +70,7 @@ class NotificationsTest extends TestCase { $this->notificationManager = $this->createMock(IManager::class); $this->urlGenerator = $this->createMock(IURLGenerator::class); - $this->notificationsController = new Notifications( + $this->notificationsController = new NotificationsController( 'comments', $this->createMock(IRequest::class), $this->commentsManager, diff --git a/apps/workflowengine/composer/composer/autoload_classmap.php b/apps/workflowengine/composer/composer/autoload_classmap.php index 39a6c6c4703..0444cce13e7 100644 --- a/apps/workflowengine/composer/composer/autoload_classmap.php +++ b/apps/workflowengine/composer/composer/autoload_classmap.php @@ -23,7 +23,7 @@ return array( 'OCA\\WorkflowEngine\\Command\\Index' => $baseDir . '/../lib/Command/Index.php', 'OCA\\WorkflowEngine\\Controller\\AWorkflowController' => $baseDir . '/../lib/Controller/AWorkflowController.php', 'OCA\\WorkflowEngine\\Controller\\GlobalWorkflowsController' => $baseDir . '/../lib/Controller/GlobalWorkflowsController.php', - 'OCA\\WorkflowEngine\\Controller\\RequestTime' => $baseDir . '/../lib/Controller/RequestTime.php', + 'OCA\\WorkflowEngine\\Controller\\RequestTimeController' => $baseDir . '/../lib/Controller/RequestTimeController.php', 'OCA\\WorkflowEngine\\Controller\\UserWorkflowsController' => $baseDir . '/../lib/Controller/UserWorkflowsController.php', 'OCA\\WorkflowEngine\\Entity\\File' => $baseDir . '/../lib/Entity/File.php', 'OCA\\WorkflowEngine\\Helper\\LogContext' => $baseDir . '/../lib/Helper/LogContext.php', diff --git a/apps/workflowengine/composer/composer/autoload_static.php b/apps/workflowengine/composer/composer/autoload_static.php index e867bfa4feb..0b9ac89ae30 100644 --- a/apps/workflowengine/composer/composer/autoload_static.php +++ b/apps/workflowengine/composer/composer/autoload_static.php @@ -38,7 +38,7 @@ class ComposerStaticInitWorkflowEngine 'OCA\\WorkflowEngine\\Command\\Index' => __DIR__ . '/..' . '/../lib/Command/Index.php', 'OCA\\WorkflowEngine\\Controller\\AWorkflowController' => __DIR__ . '/..' . '/../lib/Controller/AWorkflowController.php', 'OCA\\WorkflowEngine\\Controller\\GlobalWorkflowsController' => __DIR__ . '/..' . '/../lib/Controller/GlobalWorkflowsController.php', - 'OCA\\WorkflowEngine\\Controller\\RequestTime' => __DIR__ . '/..' . '/../lib/Controller/RequestTime.php', + 'OCA\\WorkflowEngine\\Controller\\RequestTimeController' => __DIR__ . '/..' . '/../lib/Controller/RequestTimeController.php', 'OCA\\WorkflowEngine\\Controller\\UserWorkflowsController' => __DIR__ . '/..' . '/../lib/Controller/UserWorkflowsController.php', 'OCA\\WorkflowEngine\\Entity\\File' => __DIR__ . '/..' . '/../lib/Entity/File.php', 'OCA\\WorkflowEngine\\Helper\\LogContext' => __DIR__ . '/..' . '/../lib/Helper/LogContext.php', diff --git a/apps/workflowengine/lib/AppInfo/Application.php b/apps/workflowengine/lib/AppInfo/Application.php index 19ff530f2ae..ddf6bf30af6 100644 --- a/apps/workflowengine/lib/AppInfo/Application.php +++ b/apps/workflowengine/lib/AppInfo/Application.php @@ -27,7 +27,6 @@ namespace OCA\WorkflowEngine\AppInfo; use Closure; -use OCA\WorkflowEngine\Controller\RequestTime; use OCA\WorkflowEngine\Helper\LogContext; use OCA\WorkflowEngine\Listener\LoadAdditionalSettingsScriptsListener; use OCA\WorkflowEngine\Manager; @@ -53,7 +52,6 @@ class Application extends App implements IBootstrap { } public function register(IRegistrationContext $context): void { - $context->registerServiceAlias('RequestTimeController', RequestTime::class); $context->registerEventListener( LoadSettingsScriptsEvent::class, LoadAdditionalSettingsScriptsListener::class, diff --git a/apps/workflowengine/lib/Controller/RequestTime.php b/apps/workflowengine/lib/Controller/RequestTimeController.php index a1d9ff4a630..bb65e020c56 100644 --- a/apps/workflowengine/lib/Controller/RequestTime.php +++ b/apps/workflowengine/lib/Controller/RequestTimeController.php @@ -26,7 +26,7 @@ namespace OCA\WorkflowEngine\Controller; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; -class RequestTime extends Controller { +class RequestTimeController extends Controller { /** * @NoAdminRequired diff --git a/apps/workflowengine/src/components/Checks/request.js b/apps/workflowengine/src/components/Checks/request.js index 9f33bac6676..04d2069c7c8 100644 --- a/apps/workflowengine/src/components/Checks/request.js +++ b/apps/workflowengine/src/components/Checks/request.js @@ -38,7 +38,7 @@ const RequestChecks = [ component: RequestURL, }, { - class: 'OCA\\WorkflowEngine\\Check\\RequestTime', + class: 'OCA\\WorkflowEngine\\Check\\RequestTimeController', name: t('workflowengine', 'Request time'), operators: [ { operator: 'in', name: t('workflowengine', 'between') }, |