algoliasearch-magento-2 icon indicating copy to clipboard operation
algoliasearch-magento-2 copied to clipboard

adds explicit nullable types to missing arguments for PHP 8.4

Open jajajaime opened this issue 5 months ago • 1 comments

Summary Adds explicit nullable types to missing arguments for PHP 8.4 compatibility.

Result Using Adobe Commerce 2.4.8+, PHP 8.4 is recommended.

Example of output from running setup:upgrade

Deprecated Functionality: Algolia\AlgoliaSearch\Model\ResourceModel\Job\Grid\Collection::setSearchCriteria(): Implicitly marking parameter $searchCriteria as nullable is deprecated, the explicit nullable type must be used instead in /var/www/vendor/algolia/algoliasearch-magento-2/Model/ResourceModel/Job/Grid/Collection.php on line 100

jajajaime avatar Jun 16 '25 22:06 jajajaime

Hi @jajajaime! 👋

Big thanks for sharing this. We do have PHP 8.4 support on the radar for a future release and will be happy to incorporate your work here as well. Cheers!

cammonro avatar Jun 23 '25 18:06 cammonro

@jajajaime Thanks again for the assist! We've incorporated your work into https://github.com/algolia/algoliasearch-magento-2/pull/1785 and will be including these changes as part of our PHP 8.4 compatibility support on upcoming version 3.16.

cammonro avatar Jul 16 '25 23:07 cammonro

@cammonro No problem! I was working on a PHP 8.4 installation of Magento, so I needed them, anyway. Glad I could help.

jajajaime avatar Jul 16 '25 23:07 jajajaime