[TASK] Use new CLI binary in docs instead of cli_dispatch.phpsh 73/52473/3
authorBenni Mack <benni@typo3.org>
Mon, 17 Apr 2017 21:45:29 +0000 (23:45 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 18 Apr 2017 11:25:23 +0000 (13:25 +0200)
There are still some places left where legacy functionality is used
or documented related to cli_dispatch.phpsh instead of the generic
typo3/sysext/core/bin/typo3 binary.

Resolves: #80868
Releases: master, 8.7
Change-Id: Iad3392403a0e1b16ed42422f840de647f0b9ce0d
Reviewed-on: https://review.typo3.org/52473
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
typo3/sysext/extbase/Classes/Command/HelpCommandController.php
typo3/sysext/extbase/Classes/Mvc/Cli/Request.php
typo3/sysext/extbase/Classes/Mvc/Cli/RequestBuilder.php
typo3/sysext/scheduler/Classes/Command/SchedulerCommand.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/scheduler/Classes/Example/TestTask.php
typo3/sysext/scheduler/Classes/Scheduler.php
typo3/sysext/scheduler/Resources/Private/Language/locallang.xlf

index 44191f5..4fe13e7 100644 (file)
@@ -366,7 +366,7 @@ class SystemEnvironmentBuilder
      * - Directly called documentRoot/index.php (-> FE call or eiD include): index.php is located in the same directory
      * as the main project. The document root is identical to the directory the script is located at.
      * - The install tool, located under typo3/sysext/install/Start/Install.php.
-     * - A Backend script: This is the case for the typo3/index.php dispatcher and other entry scripts like 'cli_dispatch.phpsh'
+     * - A Backend script: This is the case for the typo3/index.php dispatcher and other entry scripts like 'typo3/sysext/core/bin/typo3'
      * or 'typo3/index.php' that are located inside typo3/ directly.
      *
      * @param string $scriptPath Calculated path to the entry script
index fd6399d..cf0216b 100644 (file)
@@ -60,7 +60,7 @@ class HelpCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandCon
      * Display help for a command
      *
      * The help command displays help for a given command:
-     * ./cli_dispatch.phpsh extbase help <command identifier>
+     * ./typo3/sysext/core/bin/typo3 extbase:help <command identifier>
      *
      * @param string $commandIdentifier Identifier of a command for more details
      * @cli
index b401ff6..60465db 100644 (file)
@@ -271,7 +271,7 @@ class Request implements \TYPO3\CMS\Extbase\Mvc\RequestInterface
      * required arguments (if any) have been specified.
      *
      * For a command method with the signature ($argument1, $argument2) and for the command line
-     * cli_dispatch.phpsh extbase some-key someaction acme:foo --argument1 Foo --argument2 Bar baz quux
+     * typo3/sysext/core/bin/typo3 acme:foo --argument1 Foo --argument2 Bar baz quux
      * this method would return array(0 => 'baz', 1 => 'quux')
      *
      * @return array Numeric array of exceeding argument values
index 27e9719..d02c98c 100644 (file)
@@ -81,10 +81,10 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface
      * name (like in $argv) but start with command right away.
      *
      * @param mixed $commandLine The command line, either as a string or as an array
-     * @param string $callingScript The calling script (usually ./typo3/cli_dispatch.phpsh)
+     * @param string $callingScript The calling script (usually ./typo3/sysext/core/bin/typo3)
      * @return \TYPO3\CMS\Extbase\Mvc\Cli\Request The CLI request as an object
      */
-    public function build($commandLine = '', $callingScript = './typo3/cli_dispatch.phpsh extbase')
+    public function build($commandLine = '', $callingScript = './typo3/sysext/core/bin/typo3')
     {
         $request = $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Cli\Request::class);
         $request->setCallingScript($callingScript);
index 7e31406..7667ebc 100644 (file)
@@ -46,7 +46,7 @@ class SchedulerCommand extends Command
         $this
             ->setDescription('Start the TYPO3 Scheduler from the command line.')
             ->setHelp('If no parameter is given, the scheduler executes any tasks that are overdue to run.
-Call it like this: typo3/cli_dispatch.phpsh scheduler --task=13 -f')
+Call it like this: typo3/sysext/core/bin/typo3 scheduler:run --task=13 -f')
             ->addOption(
                 'task',
                 'i',
index 2195061..d8841ba 100644 (file)
@@ -357,7 +357,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
         $this->view->assign('lastRunSeverity', $severity);
 
         // Check if CLI script is executable or not
-        $script = PATH_typo3 . 'cli_dispatch.phpsh';
+        $script = PATH_site . 'typo3/sysext/core/bin/typo3';
         $this->view->assign('script', $script);
 
         // Skip this check if running Windows, as rights do not work the same way on this platform
index 7e2912e..97cf7fb 100644 (file)
@@ -43,7 +43,7 @@ class TestTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask
             // Get execution information
             $exec = $this->getExecution();
             // Get call method
-            if (basename(PATH_thisScript) === 'cli_dispatch.phpsh') {
+            if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) {
                 $calledBy = 'CLI module dispatcher';
                 $site = '-';
             } else {
index f9f2f26..fad5a6a 100644 (file)
@@ -505,10 +505,10 @@ class Scheduler implements \TYPO3\CMS\Core\SingletonInterface
             } else {
                 $startTime = 'now+1minute';
             }
-            $cliDispatchPath = PATH_site . 'typo3/cli_dispatch.phpsh';
+            $cliDispatchPath = PATH_site . 'typo3/sysext/core/bin/typo3';
             list($cliDispatchPathEscaped, $startTimeEscaped) =
                 CommandUtility::escapeShellArguments([$cliDispatchPath, $startTime]);
-            $cmd = 'echo ' . $cliDispatchPathEscaped . ' scheduler | at ' . $startTimeEscaped . ' 2>&1';
+            $cmd = 'echo ' . $cliDispatchPathEscaped . ' scheduler:run | at ' . $startTimeEscaped . ' 2>&1';
             $output = shell_exec($cmd);
             $outputParts = '';
             foreach (explode(LF, $output) as $outputLine) {
index eca82bd..9b35969 100644 (file)
                                <source>The task was added successfully.</source>
                        </trans-unit>
                        <trans-unit id="msg.cliScript">
-                               <source>The script to execute the Scheduler from the command line is: &lt;strong&gt;"%s scheduler"&lt;/strong&gt;.</source>
+                               <source>The script to execute the Scheduler from the command line is: &lt;strong&gt;"%s scheduler:run"&lt;/strong&gt;.</source>
                        </trans-unit>
                        <trans-unit id="msg.cliScriptExecutable">
                                <source>The webserver user is allowed execute this script.</source>