Deprecated: Method ReflectionParameter::getClass() is deprecated in F:\xampp\htdocs\mag\vendor\magento\framework\Code\Reader\ClassReader.php on line 34

Parse error: syntax error, unexpected token "match", expecting identifier in F:\xampp\htdocs\mag\vendor\magento\module-elasticsearch\SearchAdapter\Query\Builder\Match.php on line 20

I have already install composer 1.10.19 and ElasticSearch 7.10.1 Not getting any error message during installation but when I open localhost in the browser just showing the above error message. Clean and flush command used but nothing is changing.

  • it looks like you are running PHP8. Magento does not support yet PHP8
    – Marius
    Dec 18, 2020 at 10:33
  • Yes I'm using lastest version of everything expect downgraded version of composer. So how I can Downlgrade PHP.
    – sahamalam
    Dec 18, 2020 at 11:10
  • 1
    @Marius you are right man. just uninstalled the latest version of xampp and downloaded an older version with PHP 7.4 and everything works fine.
    – sahamalam
    Dec 21, 2020 at 15:22

1 Answer 1


From what I know only EleasicSearch v 7.6.x is compatible with Magneto 2.4.x I might be wrong but please ref. to magento documentation.

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.