925c6c66454edbac4ff49b8e8ab3fbf16950033e
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Resources / Private / Php / cli.php
1 <?php
2 /*
3 * This file is part of the TYPO3 CMS project.
4 *
5 * It is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License, either version 2
7 * of the License, or any later version.
8 *
9 * For the full copyright and license information, please read the
10 * LICENSE.txt file that was distributed with this source code.
11 *
12 * The TYPO3 project - inspiring people to share!
13 */
14
15 // Exit early if php requirement is not satisfied.
16 if (version_compare(PHP_VERSION, '7.0.0', '<')) {
17 die('This version of TYPO3 CMS requires PHP 7.0 or above');
18 }
19
20 /**
21 * --------------------------------------------------------------------------------
22 * NOTE: This entry-point is deprecated since TYPO3 v8 and will be removed in
23 * TYPO3 v9. Use the binary located typo3/sysext/core/bin/typo3 instead.
24 * --------------------------------------------------------------------------------
25 * Command Line Interface module dispatcher
26 *
27 * This script takes a "cliKey" as first argument and uses that to dispatch
28 * the call to a registered script with that key.
29 * Valid cliKeys must be registered in
30 * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'].
31 */
32 call_user_func(function () {
33 $classLoader = require __DIR__ . '/../../../../../../vendor/autoload.php';
34
35 (new \TYPO3\CMS\Backend\Console\Application($classLoader))->run();
36 });