pantheon-systems / solr-power

A WordPress plugin to connect to Pantheon's Apache Solr search infrastructure, or your own!
https://wordpress.org/plugins/solr-power/
GNU General Public License v2.0
126 stars 61 forks source link

Deprecation notice in php8.1 #606

Open benerd opened 1 year ago

benerd commented 1 year ago

Hi,

I am getting deprecation notices after updating to php8.1

http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated location-> wp-content/plugins/solr-power/vendor/solarium/solarium/src/Component/RequestBuilder/RequestParamsTrait.php:153

and

Exception::__construct(): Passing null to parameter #2 ($code) of type int is deprecated location -> wp-content/plugins/solr-power/vendor/solarium/solarium/src/Exception/HttpException.php:63

which is coming from solarium plugin, could you please update the solarium composer package to resolve this.

Thanks :)

ecaron commented 1 year ago

In case the research of Solarium's support helps @pwtyler decide how to tackle this:

I'm hoping that since Terminus requires 7.4 or greater and Pantheon's the core guide recommends at least 8.0, cutting a major release to 3.0.0 that drops support for <7.3 would be considered.

junaidbhura commented 2 months ago

@pwtyler do you have an update here? Pantheon now starts at PHP 8.2 by default?

scottbuscemi commented 2 months ago

@junaidbhura Hi! We don't have an update on this currently. If you're using the Solr Power plugin with your WordPress site, we recommend sticking with PHP 8.1 for now.

junaidbhura commented 2 months ago

@scottbuscemi This happens with PHP 8.1 as well! The deprecation notice was added starting 8.1.

Since PHP 8.0 has now reached end of life, this should be picked up as soon as possible! https://www.php.net/supported-versions.php

Surely you wouldn't suggest downgrading to 8.0?