1

I have upgraded Magento from 2.2.4 to 2.4.0, i have custom modules that are not compatible with the new Magento version. So i disabled the module but when i run

 php bin/magento setup:di:compile

I got this error

In ClassReader.php line 43:
                                                                  
Class Magento\Framework\Search\Adapter\Mysql\Mapper does not exist  
                                                                  

In ClassReader.php line 36:
                                                                  
Class Magento\Framework\Search\Adapter\Mysql\Mapper does not exist 
3
  • Are you getting error in any extension ? Jul 31, 2021 at 7:17
  • 1
    Yes in custom extension shopby from Amasty Jul 31, 2021 at 16:41
  • Remove var/cache/* and generated/* before running compile commands Aug 2, 2021 at 6:15

3 Answers 3

2

Class Magento\Framework\Search\Adapter\Mysql\Mapper is not exist in magento 2.4, it's exist in magento2.2.X and magento2.3.X version for error resolution you need to upgrade your third party extension for magento2.4.x version.

4
  • I have removed the module folder, but why if i disable it, it gives an error related to the disabled module? Aug 2, 2021 at 13:58
  • Please share the error. Aug 2, 2021 at 14:01
  • In ClassReader.php line 43: Class Magento\Framework\Search\Adapter\Mysql\Mapper does not exist In ClassReader.php line 36: Class Magento\Framework\Search\Adapter\Mysql\Mapper does not exist Aug 2, 2021 at 14:45
  • Please find same class in your another third party modules same class they are used or not. OR disable the third party modules one by one and after check. Aug 2, 2021 at 15:00
1

Did you tried all of this?

rm -rf var/*
rm -rf generated/*
rm -rf pub/static/*
php bin/magento cache:clean
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
php bin/magento indexer:reindex
php bin/magento setup:static-content:deploy -f
1

Try to run the command :-

composer dump-autoload
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.