1

After Upgrade Magento latest version problem is showing under custom module.

pc-114@pc114-desktop:/var/www/html/gossip$ sudo bin/magento setup:di:compile
Compilation was started.
Area configuration aggregation... 5/9 [===============>------------]  55% 21 secs 312.0 MiB
In ClassReader.php line 57:
                                                                                                                                                                                                          
  Impossible to process constructor argument Parameter #6 [ <required> Magento\Framework\Search\Adapter\Mysql\Mapper $mapper ] of Manadev\ProductCollection\Resources\Filters\SearchFilterResource class  
                                                                                                                                                                                                          

In GetParameterClassTrait.php line 34:
                                                                        
  Class "Magento\Framework\Search\Adapter\Mysql\Mapper" does not exist  
                                                                        

setup:di:compile
4
  • this class is delete in magento 2.4. Error comes because you have used this class in di
    – Mehran
    Commented Dec 28, 2022 at 7:00
  • php bin/magento dev:di:info "Magento\Framework\Search\Adapter\Mysql\Mapper" to see where it is used and remove the class from there
    – Mehran
    Commented Dec 28, 2022 at 7:02
  • it's showing There are no commands defined in the "dev:di" namespace. Did you mean this? setup:di Commented Dec 28, 2022 at 7:10
  • check this magento.stackexchange.com/questions/319437/…
    – Mehran
    Commented Dec 28, 2022 at 7:22

2 Answers 2

0

Run this command on you root

grep -r "Magento\Framework\Search\Adapter\Mysql\Mapper" app/

It will show you the file name where you override this class.

Just Disable/Remove those overrides from the di.xml (Any preference/virtual classes/plugin) and also delete those overrides PHP file as well otherwise whenever setup:di:compile runs same error will come.

0

Your issue was caused by Manadev Multiple Select Layered Navigation (Filters) extension, your current extension version is not compatible with Magento 2.4 due to Magento\Framework\Search\Adapter\Mysql\Mapper $mapper was removed since Magento 2.4

So, there are some approaches for you:

  1. Upgrade Manadev Multiple Select Layered Navigation (Filters) extension to the latest version to check if it resolves your issue.
  2. If solution 1 does not work, you have to investigate Manadev extension to fix the issue.
    Hints: Constructor argument Parameter number #6 in Manadev\ProductCollection\Resources\Filters\SearchFilterResource class required Magento\Framework\Search\Adapter\Mysql\Mapper but Magento\Framework\Search\Adapter\Mysql\Mapper class does not exist (removed) in Magento 2.4
    Run this command to find the file path of Manadev\ProductCollection\Resources\Filters\SearchFilterResource class:
    grep -r --include \*.php "Magento\\\Framework\\\Search\\\Adapter\\\Mysql\\\Mapper $mapper" app vendor
  3. If you don't have time or do not ready to fix Manadev extension, you should disable it.

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.