3 * Bootstrap file for psalm
6 declare(strict_types
=1);
9 use PhpMyAdmin\DatabaseInterface
;
10 use PhpMyAdmin\MoTranslator\Loader
;
11 use PhpMyAdmin\Tests\Stubs\DbiDummy
;
13 if (! defined('ROOT_PATH')) {
14 // phpcs:disable PSR1.Files.SideEffects
15 define('ROOT_PATH', dirname(__DIR__
) . DIRECTORY_SEPARATOR
);
19 // phpcs:disable PSR1.Files.SideEffects
20 define('PHPMYADMIN', true);
21 define('TESTSUITE', true);
26 include_once ROOT_PATH
. 'examples/signon-script.php';
27 require_once ROOT_PATH
. 'libraries/config.default.php';
28 require_once ROOT_PATH
. 'libraries/vendor_config.php';
29 require_once AUTOLOAD_FILE
;
31 $GLOBALS['cfg'] = $cfg;
32 $GLOBALS['server'] = 0;
33 $GLOBALS['PMA_Config'] = new Config();
35 // phpcs:disable PSR1.Files.SideEffects
36 define('PMA_VERSION', $GLOBALS['PMA_Config']->get('PMA_VERSION'));
37 define('PMA_MAJOR_VERSION', $GLOBALS['PMA_Config']->get('PMA_MAJOR_VERSION'));
38 define('PROXY_URL', '');
39 define('PROXY_USER', '');
40 define('PROXY_PASS', '');
41 define('PMA_PATH_TO_BASEDIR', '');
44 $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36'
45 . ' (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36';
46 $GLOBALS['PMA_Config']->checkClient();
47 $GLOBALS['PMA_Config']->checkWebServerOs();
48 $GLOBALS['PMA_Config']->enableBc();// Defines constants, phpstan:level=1
50 Loader
::loadFunctions();
52 $GLOBALS['dbi'] = DatabaseInterface
::load(new DbiDummy());
54 // for PhpMyAdmin\Plugins\Import\ImportLdi
55 $GLOBALS['plugin_param'] = 'table';