After done some upgrading to 2.4.6-p5 I get suddenly the following compile error
Application code generator... 3/9 [=========>------------------] 33% 7 secs 346.0 MiBPHP Fatal error: Class Magento\Framework\Session\SaveHandler\Redis\Config contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Cm\RedisSession\Handler\ConfigInterface::getRetries) in /home/u58658p55525/domains/staging.4youwear.nl/public_html/vendor/magento/framework/Session/SaveHandler/Redis/Config.php on line 16
back to old version..same error..strange that was working well….
what is wrong here…
It's a recent known issue, already reported,, have a look - https://github.com/magento/magento2/issues/38728
Hello @richardnor2653
Please run the following commands:
composer require colinmollenhour/php-redis-session-abstract:1.5.5 composer update php bin/magento s:up php bin/magento s:d:c php bin/magento s:s:d -f php bin/magento c:f
Hope it helps !
If you find our reply helpful, please give us kudos.
A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
WebDesk Solution Support Team
Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9
Have you solved the problem?
Hi @richardnor2653,
The error you're encountering indicates that the class
Magento\Framework\Session\SaveHandler\Redis\Config is missing an implementation for the getRetries method, which is required by the Cm\RedisSession\Handler\ConfigInterface interface. This can happen due to various reasons such as corrupted files, partial updates, or inconsistencies in your vendor directory.
First, ensure that your vendor directory is consistent and up-to-date. Run the following commands:
composer install
composer dump-autoload
These commands will ensure that all dependencies are properly installed and the autoloader is correctly generated.
Ensure that your Cm_RedisSession module is correctly configured and up-to-date. Check the composer.json file to make sure it lists the correct version of Cm_RedisSession. You can manually update it if necessary:
composer require colinmollenhour/credis-session
This will install the latest version of the Cm_RedisSession package.
Clear all generated code and Magento caches:
rm -rf var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* pub/static/* php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:flush
Manually inspect the Config.php file located at vendor/magento/framework/Session/SaveHandler/Redis/Config.php. Ensure it correctly implements the getRetries method required by the Cm\RedisSession\Handler\ConfigInterface.
namespace Magento\Framework\Session\SaveHandler\Redis;
use Cm\RedisSession\Handler\ConfigInterface;
class Config implements ConfigInterface { // Other methods... /** * Retrieve the number of retries for failed connection attempts * * @return int */ public function getRetries() { // Return the appropriate value based on your configuration return 3; // Example value } // Other methods... }
If the above steps do not resolve the issue, revert to a previous known working state. You can use your version control system (e.g., Git) to revert the codebase to a commit that was known to work.
Review the composer.lock file for any recent updates to colinmollenhour/credis-session or any related packages. It's possible that an update introduced changes that are not compatible with your current Magento version.
the error you're encountering is due to the Magento\Framework\Session\SaveHandler\Redis\Config class not implementing the required getRetries method. Follow the steps outlined above to ensure that your dependencies are correct, clear caches, and verify that the necessary methods are implemented.
If the issue will be resolved, Click Kudos & Accept as a Solution.