2022-09-16 15:03:19 +02:00
|
|
|
#!/usr/bin/env php
|
2022-01-26 15:16:46 +01:00
|
|
|
<?php declare(strict_types=1);
|
2022-09-16 15:03:19 +02:00
|
|
|
|
2022-01-25 20:29:19 +01:00
|
|
|
namespace App\Controller;
|
|
|
|
|
2022-01-19 21:08:44 +01:00
|
|
|
if (php_sapi_name() !== 'cli') {
|
2023-09-19 18:21:42 +02:00
|
|
|
echo 'This application must be run on the command line.' . PHP_EOL;
|
2023-09-19 19:23:24 +02:00
|
|
|
exit;
|
2022-02-12 19:39:05 +01:00
|
|
|
}
|
|
|
|
|
2023-09-19 19:23:24 +02:00
|
|
|
// check php version (must be >= 8.1)
|
|
|
|
/** @noinspection PhpArgumentWithoutNamedIdentifierInspection */
|
|
|
|
if (version_compare(PHP_VERSION, '8.1.0', '<')) {
|
|
|
|
echo 'This application requires PHP 8.1 or newer. You are running ' . PHP_VERSION . PHP_EOL;
|
|
|
|
echo 'If you are using KeyHelp, use keyhelp-php81 ' . $argv[0] . ' instead.' . PHP_EOL;
|
|
|
|
exit;
|
2022-01-23 15:21:41 +01:00
|
|
|
}
|
|
|
|
|
2023-09-19 19:23:24 +02:00
|
|
|
/** @noinspection PhpArgumentWithoutNamedIdentifierInspection */
|
|
|
|
require dirname(__DIR__, 1) . '/src/Util/Console.php';
|