bindAPI/bin/console

21 lines
672 B
Plaintext
Raw Permalink Normal View History

2022-09-16 15:03:19 +02:00
#!/usr/bin/env php
<?php declare(strict_types=1);
2022-09-16 15:03:19 +02:00
namespace App\Controller;
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;
}
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;
}
2023-09-19 19:23:24 +02:00
/** @noinspection PhpArgumentWithoutNamedIdentifierInspection */
require dirname(__DIR__, 1) . '/src/Util/Console.php';