Skip to content

Deprecated Functionality Error in SessionManager.php on line 186 after update to 2.4.6

After updating my Magento store to version 2.4.6, I’m encountering a deprecated functionality error when visiting the admin page. The front-end, however, works fine.

Deprecated Functionality: Creation of dynamic property MagentoFrameworkAcl::$_roleRegistry is deprecated in vendor/magento/framework/Session/SessionManager.php on line 186.

The code at line 186 in SessionManager.php is

session_start();
if (isset($_SESSION['destroyed'])
    && $_SESSION['destroyed'] < time() - $this->sessionConfig->getCookieLifetime()
) {
    $this->destroy(['clear_storage' => true]);
}

Magento 2.4.6 Php 8.2