Jelajahi Sumber

Merge branch 'hotfix/restore_custom_cli_commands'

Olivier Massot 2 tahun lalu
induk
melakukan
31ee3c1403
2 mengubah file dengan 11 tambahan dan 64 penghapusan
  1. 0 53
      ot_admin/Configuration/Commands.php
  2. 11 11
      ot_admin/Configuration/Services.yaml

+ 0 - 53
ot_admin/Configuration/Commands.php

@@ -1,53 +0,0 @@
-<?php
-/**
- * Commands to be executed by typo3, where the key of the array
- * is the name of the command (to be called as the first argument after typo3).
- * Required parameter is the "class" of the command which needs to be a subclass
- * of Symfony/Console/Command.
- */
-
-// /!\ WARNING: this way of register commands will be deprecated with Typo3 v10
-// https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/CommandControllers/Index.html#creating-a-new-command-in-extensions
-
-return [
-    'ot:site:create' => [
-        'class' => Opentalent\OtAdmin\Command\CreateSiteCommand::class
-    ],
-    'ot:site:delete' => [
-        'class' => Opentalent\OtAdmin\Command\DeleteSiteCommand::class
-    ],
-    'ot:site:undelete' => [
-        'class' => Opentalent\OtAdmin\Command\UndeleteSiteCommand::class
-    ],
-    'ot:site:update' => [
-        'class' => Opentalent\OtAdmin\Command\UpdateSiteCommand::class
-    ],
-    'ot:site:clear-cache' => [
-        'class' => Opentalent\OtAdmin\Command\ClearSiteCacheCommand::class
-    ],
-    'ot:site:setdomain' => [
-        'class' => Opentalent\OtAdmin\Command\SetSiteDomainCommand::class
-    ],
-    'ot:site:reset-perms' => [
-        'class' => Opentalent\OtAdmin\Command\ResetBeUserPermsCommand::class
-    ],
-    'ot:site:status' => [
-        'class' => Opentalent\OtAdmin\Command\GetSiteStatusCommand::class
-    ],
-    'ot:redirection:add' => [
-        'class' => Opentalent\OtAdmin\Command\AddRedirectionCommand::class
-    ],
-    'ot:redirection:remove' => [
-        'class' => Opentalent\OtAdmin\Command\RemoveRedirectionCommand::class
-    ],
-    'ot:site:scan' => [
-        'class' => Opentalent\OtAdmin\Command\ScanCommand::class
-    ],
-    'ot:regen-config-files' => [
-        'class' => Opentalent\OtAdmin\Command\RegenConfigFilesCommand::class
-    ],
-    'ot:clear-obsoletes-websites' => [
-        'class' => Opentalent\OtAdmin\Command\ClearObsoleteWebsitesSiteCommand::class
-    ],
-];
-

+ 11 - 11
ot_admin/Configuration/Services.yaml

@@ -9,66 +9,66 @@ services:
 
   Opentalent\OtAdmin\Command\CreateOrganizationCommand:
     tags:
-      - name: 'ot:site:create'
+      - name: console.command
         command: 'ot:site:create'
         schedulable: false
 
   Opentalent\OtAdmin\Command\DeleteOrganizationCommand:
     tags:
-      - name: 'ot:site:delete'
+      - name: console.command
         command: 'ot:site:delete'
         schedulable: false
 
   Opentalent\OtAdmin\Command\UndeleteOrganizationCommand:
     tags:
-      - name: 'ot:site:undelete'
+      - name: console.command
         command: 'ot:site:undelete'
         schedulable: false
 
   Opentalent\OtAdmin\Command\ClearSiteCacheCommand:
     tags:
-      - name: 'ot:site:clear-cache'
+      - name: console.command
         command: 'ot:site:clear-cache'
         schedulable: true
 
   Opentalent\OtAdmin\Command\SetSiteDomainCommand:
     tags:
-      - name: 'ot:site:setdomain'
+      - name: console.command
         command: 'ot:site:setdomain'
         schedulable: true
 
   Opentalent\OtAdmin\Command\ResetBeUserPermsCommand:
     tags:
-      - name: 'ot:site:reset-perms'
+      - name: console.command
         command: 'ot:site:reset-perms'
         schedulable: true
 
   Opentalent\OtAdmin\Command\UpdateRoutingIndexCommand:
     tags:
-      - name: 'ot:site:index'
+      - name: console.command
         command: 'ot:site:index'
         schedulable: true
 
   Opentalent\OtAdmin\Command\GetSiteStatusCommand:
     tags:
-      - name: 'ot:site:status'
+      - name: console.command
         command: 'ot:site:status'
         schedulable: false
 
   Opentalent\OtAdmin\Command\AddRedirectionCommand:
     tags:
-      - name: 'ot:redirection:add'
+      - name: console.command
         command: 'ot:redirection:add'
         schedulable: false
 
   Opentalent\OtAdmin\Command\RemoveRedirectionCommand:
     tags:
-      - name: 'ot:redirection:remove'
+      - name: console.command
         command: 'ot:redirection:remove'
         schedulable: false
 
   Opentalent\OtAdmin\Command\ScanCommand:
     tags:
-      - name: 'ot:site:scan'
+      - name: console.command
         command: 'ot:site:scan'
         schedulable: true