Problem/Motivation

According to the End of life announcement and changes to Drupal 7 support (PSA-2023-06-07), we should drop official PHP 5.5 and lower support for D7 starting from 1.8.2023.

Remaining tasks

  1. We need to commit a patch updating the INSTALL.txt file + other files (see the patch)
  2. Remove automated d.o. testing for PHP lower than PHP 5.6 (e.g. PHP 5.3 & MySQL 5.5 2,159 pass)

And update (at least) these three docs pages (I do not have permission):

  1. https://www.drupal.org/about/core/policies/core-release-cycles/drupal-7-... - we need to update the release schedule and EOL date mentioned in the text abobe the release schedule
  2. https://www.drupal.org/docs/7/system-requirements/overview#s-php - update the PHP section
  3. https://www.drupal.org/docs/7/system-requirements/php-requirements-for-d... - fix the supported and recommended versions table

Release notes snippet

We should add change record or release note mention, see the comment #2.

CommentFileSizeAuthor
#3 interdiff_2-3.txt272 bytespoker10
#3 3379524-3.patch1.76 KBpoker10
#2 3379524-2.patch2.11 KBpoker10

Comments

poker10 created an issue. See original summary.

poker10’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new2.11 KB

Updated the wording in the IS and added a patch for INSTALL.txt + other files (base on #3319435: Update system requirements (including INSTALL.txt) for D7).

As in the other issue we committed earlier, I suppose we should add a change record or at least release note mention, because all sites on PHP lower than PHP 5.6 will be unable to run update.php after this is released (see ).

poker10’s picture

StatusFileSize
new1.76 KB
new272 bytes

We have discussed this with @mcdruid on Slack and think that it will be better not to block DrupalCI / update.php on lower PHP versions right now.

Uploading a modified patch, which will block only installing a new Drupal site on PHP < 5.6 (which is something, that nobody should do these day anyway) and which is updating text requirements.

mcdruid’s picture

I've updated the docs pages listed (1,2,3) in the IS.

Discussed with @poker10 that we might not remove D7's ability to run tests in earlier PHP versions (e.g. by updating the DRUPAL_MINIMUM_PHP constant).

However, that doesn't mean older versions are still supported - it just might be useful to be able to check whether proposed changes will break in versions that are no longer actively supported / recommended.

poker10’s picture

The PHP 5.3 testing now has one failure - https://www.drupal.org/pift-ci-job/2743110:

testInternalBrowser

fail: [Browser] Line 76 of modules/simpletest/simpletest.test:
Cannot access install.php with a "simpletest" user-agent header.

It seems like this part of the code is checking that access to the install.php is disabled while running tests (see: #225880: non-writablilty of settings.php when created by webserver). The code is supposed to run and return 403 a bit further:

  // The user agent header is used to pass a database prefix in the request when
  // running tests. However, for security reasons, it is imperative that no
  // installation be permitted using such a prefix.
  if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], "simpletest") !== FALSE) {
    header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
    exit;
  }

We should either add a similar check to the install.php (probably not worth), or keep it as it is, as the test is passing in other PHP versions, so it is still being tested if everything is OK. This failure will also highlight that the PHP 5.3 is unsupported, as there will be at least this one mentioned failure present.

poker10’s picture

Or we could also add a 403 header to the install.php, just before the exit call.

// Exit early if running an incompatible PHP version to avoid fatal errors.
if (version_compare(PHP_VERSION, '5.6.0') < 0) {
  print 'Your PHP installation is too old. Drupal requires at least PHP 5.6. See the <a href="https://www.drupal.org/docs/7/system-requirements">system requirements</a> page for more information.';
  exit;
}

But personally, I think that this one failure in unsupported PHP version is not a problem.

poker10’s picture

I have drafted a change record: https://www.drupal.org/node/3383555

I think this is ready to be committed (patch #3).

mcdruid’s picture

Status: Needs review » Reviewed & tested by the community

Yup this looks good to me +1

  • poker10 committed ca23b5ee on 7.x
    Issue #3379524 by poker10, mcdruid: Update PHP requirements for D7...
poker10’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

I have also removed the PHP 5.3 & MySQL 5.5 from core auto-testing (but it can still be triggered manually in the future, if needed, until the DrupalCI is turned off).

Seems like all points are addressed, so closing this.

Status: Fixed » Closed (fixed)

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