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)
December 17, 2021
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
Related articles:
- Error “Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: mysqli, openssl” (SOLVED) (100%)
- “Failed - Network error” when exporting from phpMyAdmin (SOLVED) (100%)
- How to install Apache web server with PHP, MySQL and phpMyAdmin on Windows (95.9%)
- Case sensitive search in phpMyAdmin (86.1%)
- How to search in phpMyAdmin (82.1%)
- How to downgrade to a previous kernel in Arch Linux (RANDOM - 4.1%)
The latest 5.1 version in development (phpMyAdmin 5.1+snapshot) has now all the fixes needed normally, please try it and let us know 🙂
Hello! Thank you for the good news!
Thanks for this sharing. It's OK for me with phpmyadmin 5.2.
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
Hello! I'm glad the information was useful to you. Thanks for your feedback!
I really appreciate you sharing this. saved me some headache. Thanks a bunch
Tanks Bro