Problem/Motivation

Upgrading search_api 8.x-1.26 to 8.x-1.27 results in a compatibility warning for PHP 7.3.
However, for Drupal 9.3 support, 7.3 is allowed. Per drupal.org:
From Drupal 9.3, PHP version 8.0 or higher is recommended. PHP 7.3 and higher remain supported
Further, platform requirements changes should be enumerated in release notes.

Steps to reproduce

Upgrade search_api 8.x-1.26 to 8.x-1.27 on a platform using PHP7.3, run update.php

Proposed resolution

Fix php version string in search_api.info.yml

Issue fork search_api-3317319

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

omarsidd created an issue. See original summary.

achton’s picture

This appears to have been introduced in 1.26 in #3262092.

I'm not sure this is going to be fixed in a future release. Stick to 1.25 or upgrade PHP is probable the best options.

avpaderno’s picture

Modules are allowed to require a PHP version that is higher than the minimum version required from Drupal core. Whenever changing the required PHP version should have been done in release 8.x-1.27 is a different matter. At least, the change should be documented, for example in a change record.

drunken monkey’s picture

Status: Active » Needs review
Related issues: +#3262092: Make search_api compatible with Drupal 10
StatusFileSize
new1.35 KB

First off, as achton and apaderno pointed out, modules are free to specify their own minimum PHP versions. This is pretty much without alternative if you think about modules using third-party libraries.

Also, please note that PHP 7.3 has been unsupported for over a year, with PHP 7.4 very soon to follow, so I’d very much advise you to upgrade to PHP 8.1 regardless. (Otherwise you’ll soon have the same problem with Drupal itself, as soon as Drupal 9 becomes unsupported.)

However, I now see that just changing this on a whim when fixing Drupal 10 compatibility was still not the best of ideas. It seems just removing the two property declarations that required the change should work just as well.
Please see, test and review the attached patch for reverting those bits of #3262092: Make search_api compatible with Drupal 10.

Status: Needs review » Needs work

The last submitted patch, 4: 3317319-4--support_php_73.patch, failed testing. View results

drunken monkey’s picture

Component: Miscellaneous » General code
Status: Needs work » Needs review
StatusFileSize
new1.34 KB
new2.46 KB

OK, so at least there was a reason we had that there.
Second try.

b.lammers made their first commit to this issue’s fork.

drunken monkey’s picture

I’m going to create a new release containing the fix for #3318187: Fix regressions in Views filters shortly. If you want the PHP version requirement reduced again, please test/review. Otherwise this will probably be closed as “won’t fix”.

mkalkbrenner’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me ... if we really want to keep the support for a PHP version that already reached EOL.
I would prefer to raise the requirement and improve the code quality.

  • drunken monkey committed c0b27f6 on 8.x-1.x
    Issue #3317319 by drunken monkey, mkalkbrenner: Reverted the required...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

I would also much rather depend on PHP 8.1 already and not have people work with unsupported PHP versions on their servers, but I don’t think the Search API module should force them as long as Drupal itself still supports 7.3. We’ll drop Drupal 9 support soon enough and can then start using even PHP 8.1, not just 7.4. (Very much looking forward to that.) In any case, even if we wanted to preempt Drupal, the timing with the security release was also less than ideal. (Though we couldn’t know that before, of course.)

Anyways, thanks a lot for reviewing, good to hear it looks OK. (Would still have liked feedback from the people who actually wanted this change, but well.)
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.