Loading...
X

phpMyAdmin error “Deprecation Notice in .\vendor\twig\twig\src\Loader\FilesystemLoader.php#40 realpath(): Passing null to parameter #1 ($path) of type string is deprecated” (SOLVED)

At the time of this writing, the latest release of phpMyAdmin (5.1) is not fully compatible with the latest PHP versions (8.1.1), so the program displays the following deprecated syntax notices:

Deprecation Notice in .\vendor\twig\twig\src\Loader\FilesystemLoader.php#40
 realpath(): Passing null to parameter #1 ($path) of type string is deprecated

Backtrace

.\vendor\twig\twig\src\Loader\FilesystemLoader.php#40: realpath(NULL)
.\libraries\classes\Template.php#57: Twig\Loader\FilesystemLoader->__construct(string 'C:\\Server\\data\\htdocs\\-phpmyadmin\\\\templates\\')
.\libraries\classes\Theme.php#101: PhpMyAdmin\Template->__construct()
.\libraries\classes\Theme.php#174: PhpMyAdmin\Theme->__construct()
.\libraries\classes\ThemeManager.php#307: PhpMyAdmin\Theme::load(
string './themes/metro',
string 'C:\\Server\\data\\htdocs\\-phpmyadmin\\./themes/metro/',
)
.\libraries\classes\ThemeManager.php#79: PhpMyAdmin\ThemeManager->loadThemes()
.\libraries\classes\ThemeManager.php#121: PhpMyAdmin\ThemeManager->__construct()
.\libraries\classes\ThemeManager.php#385: PhpMyAdmin\ThemeManager::getInstance()
.\libraries\common.inc.php#240: PhpMyAdmin\ThemeManager::initializeTheme()
.\index.php#15: require_once(.\libraries\common.inc.php)
Deprecation Notice in .\vendor\twig\twig\src\Markup.php#35
 Return type of Twig\Markup::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Backtrace

.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\src\Markup.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'C:\\Server\\data\\htdocs\\-phpmyadmin\\vendor\\composer/../twig/twig/src/Markup.php')
.\tmp\twig\46\46f1bfbf4328d3d22fddffb9178fdeb9868d0740e4cc8b5bbd6f2fcfb8e4523e.php#59: Composer\Autoload\ClassLoader->loadClass(string 'Twig\\Markup')
.\vendor\twig\twig\src\Template.php#405: __TwigTemplate_034511bee5325c368ee003e3d97d6cb47c3e1c94ebb527bcf0b76ba7818d1ac6->doDisplay(
array,
array,
)
.\vendor\twig\twig\src\Template.php#378: Twig\Template->displayWithErrorHandling(
array,
array,
)
.\vendor\twig\twig\src\Template.php#390: Twig\Template->display(array)
.\vendor\twig\twig\src\TemplateWrapper.php#45: Twig\Template->render(
array,
array,
)
.\libraries\classes\Template.php#132: Twig\TemplateWrapper->render(array)
.\libraries\classes\Header.php#714: PhpMyAdmin\Template->render(
string 'javascript/variables',
array,
)
.\libraries\classes\Header.php#193: PhpMyAdmin\Header->getVariablesForJavaScript()
.\libraries\classes\Header.php#142: PhpMyAdmin\Header->addDefaultScripts()
.\libraries\classes\Response.php#184: PhpMyAdmin\Header->__construct()
.\libraries\classes\Response.php#215: PhpMyAdmin\Response->__construct()
.\libraries\classes\Plugins\Auth\AuthenticationCookie.php#102: PhpMyAdmin\Response::getInstance()
.\libraries\classes\Plugins\AuthenticationPlugin.php#275: PhpMyAdmin\Plugins\Auth\AuthenticationCookie->showLoginForm()
.\libraries\common.inc.php#263: PhpMyAdmin\Plugins\AuthenticationPlugin->authenticate()
.\index.php#15: require_once(.\libraries\common.inc.php)
Deprecation Notice in .\vendor\twig\twig\src\Markup.php#40
 Return type of Twig\Markup::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Backtrace

.\vendor\composer\ClassLoader.php#444: include(.\vendor\twig\twig\src\Markup.php)
.\vendor\composer\ClassLoader.php#322: Composer\Autoload\includeFile(string 'C:\\Server\\data\\htdocs\\-phpmyadmin\\vendor\\composer/../twig/twig/src/Markup.php')
.\tmp\twig\46\46f1bfbf4328d3d22fddffb9178fdeb9868d0740e4cc8b5bbd6f2fcfb8e4523e.php#59: Composer\Autoload\ClassLoader->loadClass(string 'Twig\\Markup')
.\vendor\twig\twig\src\Template.php#405: __TwigTemplate_034511bee5325c368ee003e3d97d6cb47c3e1c94ebb527bcf0b76ba7818d1ac6->doDisplay(
array,
array,
)
.\vendor\twig\twig\src\Template.php#378: Twig\Template->displayWithErrorHandling(
array,
array,
)
.\vendor\twig\twig\src\Template.php#390: Twig\Template->display(array)
.\vendor\twig\twig\src\TemplateWrapper.php#45: Twig\Template->render(
array,
array,
)
.\libraries\classes\Template.php#132: Twig\TemplateWrapper->render(array)
.\libraries\classes\Header.php#714: PhpMyAdmin\Template->render(
string 'javascript/variables',
array,
)
.\libraries\classes\Header.php#193: PhpMyAdmin\Header->getVariablesForJavaScript()
.\libraries\classes\Header.php#142: PhpMyAdmin\Header->addDefaultScripts()
.\libraries\classes\Response.php#184: PhpMyAdmin\Header->__construct()
.\libraries\classes\Response.php#215: PhpMyAdmin\Response->__construct()
.\libraries\classes\Plugins\Auth\AuthenticationCookie.php#102: PhpMyAdmin\Response::getInstance()
.\libraries\classes\Plugins\AuthenticationPlugin.php#275: PhpMyAdmin\Plugins\Auth\AuthenticationCookie->showLoginForm()
.\libraries\common.inc.php#263: PhpMyAdmin\Plugins\AuthenticationPlugin->authenticate()
.\index.php#15: require_once(.\libraries\common.inc.php)

To stop these notifications, you just need to use phpMyAdmin version 5.2 or later. At the moment, this version can be downloaded from the link https://files.phpmyadmin.net/snapshots/phpMyAdmin-5.2+snapshot-all-languages.zip


7 observations on “phpMyAdmin error “Deprecation Notice in .\vendor\twig\twig\src\Loader\FilesystemLoader.php#40 realpath(): Passing null to parameter #1 ($path) of type string is deprecated” (SOLVED)
  1. Louis Lee

    Hi Alex, I really appreciate your sharing. I have upgraded my phpmyadmin to 5.2 and it did fix my problem. 

    Best regards,

    Louis Lee

     
    Reply

Leave Your Observation

Your email address will not be published. Required fields are marked *