4 use PhpMyAdmin\Command\CacheWarmupCommand
;
5 use PhpMyAdmin\Command\FixPoTwigCommand
;
6 use PhpMyAdmin\Command\SetVersionCommand
;
7 use PhpMyAdmin\Command\WriteGitRevisionCommand
;
8 use PhpMyAdmin\Command\TwigLintCommand
;
10 use PhpMyAdmin\Container\ContainerBuilder
;
11 use PhpMyAdmin\DatabaseInterface
;
12 use PhpMyAdmin\Tests\Stubs\DbiDummy
;
13 use Symfony\Component\Console\Application
;
15 if (! defined('ROOT_PATH')) {
16 define('ROOT_PATH', dirname(__DIR__
) . DIRECTORY_SEPARATOR
);
19 define('PHPMYADMIN', true);
20 require_once ROOT_PATH
. 'app/constants.php';
21 require_once AUTOLOAD_FILE
;
23 if (! class_exists(Application
::class)) {
24 echo 'Be sure to have dev-dependencies installed.' . PHP_EOL
;
25 echo 'Command aborted.' . PHP_EOL
;
29 $containerBuilder = ContainerBuilder
::getContainer();
30 $cfg['environment'] = 'production';
31 $config = new Config();
32 $config->loadAndCheck(CONFIG_FILE
);
33 $config->set('environment', $cfg['environment']);
34 $dbi = new DatabaseInterface(new DbiDummy());
36 $application = new Application('phpMyAdmin Console Tool');
38 $application->add(new CacheWarmupCommand());
39 $application->add(new TwigLintCommand());
40 $application->add(new SetVersionCommand());
41 $application->add(new WriteGitRevisionCommand());
42 $application->add(new FixPoTwigCommand());