1

I trying to run magento 2.4.5 on ubuntu 22.04 and am running into multiple issues.

Currently I am trying to run the setup:di:compile command and I get the following error:

PHP Fatal error: During inheritance of Iterator: Uncaught Exception: Deprecated Functionality: Return type of Magento\CatalogSearch\Model\Indexer\Fulltext\Action\IndexIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/IndexIterator.php on line 137 in /vendor/magento/framework/App/ErrorHandler.php:62

What can I do on my side to fix this -- this seems to be magento 2 code and not one of my plugins

Kind Regards

JVR
  • 11
  • 1

1 Answers1

1

Add this line above the function where you get error -

#[\ReturnTypeWillChange]

Vivek
  • 147
  • 5