i have upgraded magento 2.3.4 to 2.4.0 but when I run compile command, it's showing an error

enter image description here


  Compilation was started.
Area configuration aggregation... 5/8 [=================>----------]  62% 34 secs 340.0 MiB
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  

I want to use mysql instead of elastic search


No, elasticsearch is prerequisite along with php7.4 for upgrading to Magento2.4. I've upgraded from 2.3.4 to 2.4.0 couple of days ago and it wouldn't let me upgrade without elasticsearch so I installed it and it upgraded smoothly.

  • I've done the same. Therefore I added the required rows into core_config_data and it seems to work (copied them from another 2.4 instance). However, I'm wondering if this is the usual approach when upgrading. Or is it required to add them with the CLI? – robsch Dec 9 '20 at 12:25
  • I did everything through CLI. Didn't change anything in core_config_data. – Abdul Samad Abbasi Dec 9 '20 at 12:34
  • And how did you configure Elasticsearch in Magento? You could add that to your answer. – robsch Dec 9 '20 at 12:52
  • I just installed it from elastic search official website, link was given in magento official website. It was all running without any specific configurations in magento. – Abdul Samad Abbasi Dec 9 '20 at 13:04
  • Just wondering who or what has inserted the catalog/search/elasticsearch7_* paths and values into core_config_data. These values must exist in the table for Magento 2.4, afaik. – robsch Dec 10 '20 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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