3 declare(strict_types
=1);
6 use PhpMyAdmin\Controllers\JavaScriptMessagesController
;
7 use PhpMyAdmin\OutputBuffering
;
9 /** @psalm-suppress InvalidGlobal */
10 global $containerBuilder;
12 if (! defined('ROOT_PATH')) {
13 // phpcs:disable PSR1.Files.SideEffects
14 define('ROOT_PATH', dirname(__DIR__
) . DIRECTORY_SEPARATOR
);
18 if (PHP_VERSION_ID
< 70205) {
19 die('<p>PHP 7.2.5+ is required.</p><p>Currently installed version is: ' . PHP_VERSION
. '</p>');
22 // phpcs:disable PSR1.Files.SideEffects
23 define('PHPMYADMIN', true);
26 require_once ROOT_PATH
. 'libraries/constants.php';
31 if (! @is_readable
(AUTOLOAD_FILE
)) {
33 '<p>File <samp>' . AUTOLOAD_FILE
. '</samp> missing or not readable.</p>'
34 . '<p>Most likely you did not run Composer to '
35 . '<a href="https://docs.phpmyadmin.net/en/latest/setup.html#installing-from-git">'
36 . 'install library files</a>.</p>'
40 require AUTOLOAD_FILE
;
45 header('Content-Type: text/javascript; charset=UTF-8');
47 // Cache output in client - the nocache query parameter makes sure that this file is reloaded when config changes.
48 header('Expires: ' . gmdate('D, d M Y H:i:s', time() +
3600) . ' GMT');
50 $isMinimumCommon = true;
51 // phpcs:disable PSR1.Files.SideEffects
52 define('PMA_PATH_TO_BASEDIR', '../');
53 define('PMA_NO_SESSION', true);
58 $buffer = OutputBuffering
::getInstance();
61 register_shutdown_function(static function (): void
{
62 echo OutputBuffering
::getInstance()->getContents();
65 /** @var JavaScriptMessagesController $controller */
66 $controller = $containerBuilder->get(JavaScriptMessagesController
::class);