phpmyadmin/scripts/console
William Desportes ecba412eda
Add a warning and exit code 1 when de-dependencies are not installed
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-03-28 10:38:11 +01:00

28 lines
706 B
PHP
Executable File

#!/usr/bin/env php
<?php
use PhpMyAdmin\Command\AdvisoryRulesCommand;
use PhpMyAdmin\Command\CacheWarmupCommand;
use Symfony\Component\Console\Application;
if (! defined('ROOT_PATH')) {
define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
}
define('PHPMYADMIN', true);
require_once ROOT_PATH . 'libraries/vendor_config.php';
require_once AUTOLOAD_FILE;
if (! class_exists(Application::class)) {
echo 'Be sure to have dev-dependencies installed.' . PHP_EOL;
echo 'Command aborted.' . PHP_EOL;
exit(1);
}
$application = new Application('phpMyAdmin Console Tool');
$application->add(new AdvisoryRulesCommand());
$application->add(new CacheWarmupCommand());
$application->run();