Problem/Motivation

Followup to #2842431: [policy] Remove PHP 5.5, 5.6 support in Drupal 8.7 and #2670966: Warn users of old PHP versions. Once we have exact dates for the end of Drupal's support for each of PHP 5.5, 5.6, and 7.0, we should add the specific dates to the status report warnings.

Proposed resolution

Remaining tasks

User interface changes

HEAD (on PHP 5.x) (committed in #2670966: Warn users of old PHP versions)
HEAD (on PHP 7.0) (committed in #2670966: Warn users of old PHP versions)
This patch (on PHP 5.x)
This patch (on PHP 7.0)

API changes

None.

Data model changes

None.

Comments

xjm created an issue. See original summary.

xjm’s picture

Issue summary: View changes
xjm’s picture

Status: Postponed » Active
xjm’s picture

Issue summary: View changes
larowlan’s picture

Version: 8.4.x-dev » 8.5.x-dev
Priority: Major » Critical

I think we have to get the specific dates into 8.5 so people know they have 12 months

wim leers’s picture

Assigned: Unassigned » wim leers
wim leers’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new53.31 KB
new58.49 KB
new2.07 KB
HEAD (committed in #2670966: Warn users of old PHP versions)
This patch
webchick’s picture

The new error message is vastly better, thanks. My concern with the first version is it didn't place a timeline on "a future Drupal release," leading to widespread panic. :) Letting people know they've gotta do something by March 2019 will cut down on that significantly.

larowlan’s picture

I think this is good to go - but one tiny question - should we also link to the release schedule on d.o - can link from the will be released on March 6 2019 for example?

wim leers’s picture

#9 Sure! Which URL is that you want me to link to? (I scanned both this issue and #2842431: [policy] Remove PHP 5.5, 5.6 support in Drupal 8.7, didn't find which URL you meant.) I think perhaps we don't have that URL yet because https://docs.google.com/document/d/1kQG4E2L6Ye-M0RUuz7UkTZfyUPKoI-Vd2s8Y... hasn't been updated+posted?

larowlan’s picture

I was thinking https://www.drupal.org/core/release-cycle-overview, but it only deals with the next cycle

yoroy’s picture

The specific date introduced here is very welcome information.

@larowlan's question is a good one. Ideally we would be able to link to this information on d.o. (would be weird that the installer knows about this but d.o. doesn't mention it). Do we have a page that mentions dates for future releases?

I only have questions/concerns with the bits of text that are not changed so probably out of scope:

- First sentence is a repeat of the actual info this is the description for. Could be dropped without loss of meaning
- "…receive Drupal updates … remains secure" reads as if running a newer PHP automagically takes care of updates, security. More like: *can* receive updates … *able* to keep secure?)

wim leers’s picture

#12: I'd be happy to make those string changes if that's what @webchick + @larowlan also prefer!

yoroy’s picture

Status: Needs review » Reviewed & tested by the community

Ok. Lets leave out the link to info that isnt available yet. As is this is already solid.

xjm’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +8.5.0 release notes

Ah, so the reason the dates aren't there is that right after we set the dates, we started discussing a couple of changes to the release cycle. We might shift our release dates to better match PHP's and Symfony's, and we're also looking at whether a 4-month cycle (three minors per year) would be better. The date is likely correct though. Should we remove the minor version number but keep the date?

The PHP requirements page will also have the date now that we've set it. I think that's a more appropriate status report link (and it's already in there). The release cycle page is more developer-focused and maybe too in the weeds.

Also, should we make the textual improvements proposed in #12?

Thanks!

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

catch’s picture

The date is likely correct though. Should we remove the minor version number but keep the date?

Let's do that, good plan.

wim leers’s picture

Status: Needs review » Needs work

On it!

wim leers’s picture

Status: Needs work » Needs review
StatusFileSize
new1.82 KB
new2.03 KB

The date is likely correct though. Should we remove the minor version number but keep the date?

Done.

Interdiff isn't very helpful. This is what changed:

Before
Support for this version will be  dropped in Drupal 8.7.0, which will be released on March 6, 2019.
After
Support for this version will be  dropped on March 6, 2019.
wim leers’s picture

StatusFileSize
new1.72 KB
new1.98 KB

Also, should we make the textual improvements proposed in #12?

I didn't see @catch +1'ing this, but given that both @yoroy and @xjm think this is a good idea, I think he wouldn't oppose it either. So, did that too, separately, so you can still easily go back to #19.

Interdiff isn't very helpful. This is what changed:

Before
Support for this version will be dropped on March 6, 2019.

+

[…] your site continues to receive Drupal updates and remains secure.
After

+
[…] your site can receive updates and is able to remain secure.
wim leers’s picture

Issue summary: View changes
StatusFileSize
new47.31 KB

Updated "after" screenshot in IS.

David_Rothstein’s picture

I think "Drupal" needs to be retained in one of the first two sentences - removing that reintroduces some of the ambiguity that was in the earlier patches in #2670966: Warn users of old PHP versions (where it was unclear if it was talking about Drupal security support or PHP security support).

So I suggest changing the first sentence to:

  • "Drupal will drop support for this version on March 6, 2019".

Otherwise looks good, but:

  • '%version' => $phpversion can be removed if it's no longer used in the string
  • "can receive updates and is able to remain secure" is repetitive (since "can" and "is able to" mean the exact same thing). Could just be "can receive updates and remain secure".
xjm’s picture

Status: Needs review » Needs work

For #22.

xjm’s picture

I also did some rewriting on https://docs.google.com/document/d/1kQG4E2L6Ye-M0RUuz7UkTZfyUPKoI-Vd2s8Y... -- this issue's scope includes getting that announcecment done as well.

wim leers’s picture

Status: Needs work » Needs review
StatusFileSize
new1.63 KB
new1.94 KB

Addressed #22.

wim leers’s picture

I did some rewriting (well, leaving suggestions, because I can't edit it) of https://docs.google.com/document/d/1kQG4E2L6Ye-M0RUuz7UkTZfyUPKoI-Vd2s8Y... as well. Notable:

  • it said "March 7" but this issue says it's March 6. Changed to March 6.
  • typo+HTML fixes
  • I am concerned about The end date for Drupal 8's PHP 7.0 support isn't scheduled yet, but support will continue until at least March: Imagine I'm on PHP 7.0. Or have been planning to update to PHP 7.0. Then this sounds very scary: being on PHP 7.0 may not be enough!

Other than that, I think it looks fine.

andypost’s picture

wim leers’s picture

@xjm and I pushed forward the document. Both the patch and that document need review, and hopefully can be RTBC'd.

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me

xjm’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/core/modules/system/system.install
@@ -189,11 +189,8 @@ function system_requirements($phase) {
-  // @todo Warn about specific end dates for our PHP 5.5, 5.6, and 7.0 support
-  //   once each is set.
-  // @see https://www.drupal.org/project/drupal/issues/2927344
   if ((version_compare($phpversion, DRUPAL_RECOMMENDED_PHP) < 0) && ($phase === 'install' || $phase === 'runtime')) {
-    $requirements['php']['description'] = t('Your PHP installation is running version %version. Support for this version will be dropped in a future Drupal release. Upgrade to PHP version %recommended or higher to ensure your site continues to receive Drupal updates and remains secure. See <a href="http://php.net/supported-versions.php">PHP\'s version support documentation</a> and the <a href=":php_requirements">Drupal 8 PHP requirements handbook page</a> for more information.', ['%version' => $phpversion, '%recommended' => DRUPAL_RECOMMENDED_PHP, ':php_requirements' => 'https://www.drupal.org/docs/8/system-requirements/php']);
+    $requirements['php']['description'] = t('Drupal will drop support for this version on March 6, 2019. Upgrade to PHP version %recommended or higher to ensure your site can receive updates and remain secure. See <a href="http://php.net/supported-versions.php">PHP\'s version support documentation</a> and the <a href=":php_requirements">Drupal 8 PHP requirements handbook page</a> for more information.', ['%recommended' => DRUPAL_RECOMMENDED_PHP, ':php_requirements' => 'https://www.drupal.org/docs/8/system-requirements/php']);
     $requirements['php']['severity'] = REQUIREMENT_WARNING;
   }

So the message is being displayed for PHP 5.5, 5.6, and 7.0. However, we've only finalized EOL for 5.5 and 5.6 support. I guess one approach might be to just change DRUPAL_RECOMMENDED_PHP to 7.0. OTOH, we do actually recommend that users update to 7.1+ since 7.0 support may also end on that date.

Thoughts?

catch’s picture

Do you mean change DRUPAL_RECOMMENDED_PHP to 7.1? I think we should do that regardless.

wim leers’s picture

Do you mean change DRUPAL_RECOMMENDED_PHP to 7.1? I think we should do that regardless.

This is what it's set to in HEAD:

const DRUPAL_RECOMMENDED_PHP = '7.1';

This is also what causes you to see a warning during the installation process if you're on PHP 7.0.

This is why @xjm proposed to change it to:

const DRUPAL_RECOMMENDED_PHP = '7.0';
catch’s picture

Hmm OK. Can we hardcode 7.0 instead of using DRUPAL_MINIMUM_PHP for the message with the dates? I think we'd want to keep 7.1 recommended.

xjm’s picture

Status: Needs review » Needs work

Hmm OK. Can we hardcode 7.0 instead of using DRUPAL_MINIMUM_PHP for the message with the dates? I think we'd want to keep 7.1 recommended.

Ah yeah, good idea. Because obviously the dates only apply to the specific versions mentioned.

So we should have one message (info rather than warning, runtime only) that has Your PHP installation is running version %version. It is recommended to upgrade to PHP version %recommended or higher for the best ongoing support.

And then keep current scarier stuff in the existing warning but hardcode 7.0.

wim leers’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new2.27 KB
new2.62 KB
new23.33 KB

Done.

I wasn't 100% sure what was meant with So we should have one message. My understanding is that we want to keep the "warning" message we've been having so far for sites that are on PHP 5.x, but want to change it to an "info" message in case the site has at least PHP 7.0, and show it during runtime only. That's what I implemented. If my interpretation was incorrect, I'll soon find out in the comments below :)

IS updated to reflect both possible states in the status report now (PHP 5.x vs PHP 7.0).

wim leers’s picture

Issue summary: View changes
StatusFileSize
new53.13 KB

Further expanding the screenshots in the IS to clarify the changes.

wim leers’s picture

Issue summary: View changes

BTW, @xjm published the PHP 5.5/5.6 EOL announcement: https://groups.drupal.org/node/518200. It was also widely tweeted: https://twitter.com/drupal/status/955699298615922693. Finally, the CR for this issue was published: https://www.drupal.org/node/2938726.

Status: Needs review » Needs work

The last submitted patch, 35: 2927344-35.patch, failed testing. View results

xjm’s picture

Assigned: wim leers » xjm

Oh boy. That's my excellent test coverage proving it works. ;)

Probably fastest for me to fix it since I wrote the tests, so assigning to myself.

xjm’s picture

Version: 8.6.x-dev » 8.5.x-dev

Someone mentioned on Twitter that they thought it was important to backport this patch. We are definitely going to do so. (The only reason this was filed against 8.5.x before the bulk update is that we ended up reverting it from 8.4.x because without the dates the message is pretty alarming, and we hadn't set the exact dates by the time 8.4.4 shipped.) So setting the version accordingly. Thanks!

xjm’s picture

Assigned: xjm » Unassigned
Status: Needs work » Needs review
StatusFileSize
new3.25 KB
new751 bytes

This should resolve the test failures.

wim leers’s picture

  1. +++ b/core/modules/simpletest/src/InstallerTestBase.php
    @@ -210,7 +210,7 @@ protected function setUpRequirementsProblem() {
    +    if (version_compare(phpversion(), '7.0') < 0) {
    

    You used a string.

  2. +++ b/core/modules/system/system.install
    @@ -189,12 +189,19 @@ function system_requirements($phase) {
    +    if (version_compare($phpversion, 7.0) < 0) {
    

    I used a float.

Both work, but we should probably make this consistent.

Status: Needs review » Needs work

The last submitted patch, 41: php-2927344-41.patch, failed testing. View results

xjm’s picture

The constants are strings, so let's use strings.

xjm’s picture

Status: Needs work » Needs review
StatusFileSize
new3.52 KB
new2.95 KB

Also 7.1.3 or the like won't be a valid float. :)

I added back the second sentence for the info message since the handbook pages are still relevant for PHP 7.0 as well.

David_Rothstein’s picture

Now that https://groups.drupal.org/node/518200 is posted, shouldn't the message on the status report link to that (either directly, or at least indirectly via a link on https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)?

It would also probably be a good idea to have that (or something like it) as a front page post on the main drupal.org site, eventually.

xjm’s picture

@David_Rothstein, yep, agree. I think what might actually be best is to incorporate parts of the g.d.o/core announcement into the handbook (minus the in-the-weeds parts that are mainly for core developers). That way people will also see the information when looking through Drupal's requirements before they download it, etc.

We're also talking about adding it to the frontpage announcement we do for each minor.

xjm’s picture

I tried to boil it down to the essentials, changes here:
https://www.drupal.org/node/2891690/revisions/view/10778527/10813778

xjm’s picture

Note that the PHP 7.0 screenshot is out of date, but just has the same second sentence as the others.

webchick’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new72.25 KB

Checked over both the proposed text and the handbook page changes; both look good to me. I made one small tweak to the language around PHP 7.2 support in 8.5.0 to make it more clear that the issue has been resolved in 8.5.0 (or at least #2923015: [PHP 7.2] Incompatible method declarations is Closed (Fixed)) vs. before it sounded more like we were kinda "targeting" support for that release. https://www.drupal.org/node/2891690/revisions/view/10813778/10818984

The PHP 5 version of the error is very easy to trigger from SimplyTest.me; verified that it displays the warning upon install:

PHP Warning

I can't trigger the PHP 7.0 one as easily to test it, but in reading it, it seems fine.

Marking RTBC. Thanks a lot for the hard work on this, all!

larowlan’s picture

Status: Reviewed & tested by the community » Needs review

Is this still needs work for #46? Not sure if #47(xjm) is saying yes to #46 or that it should go in handbook instead

xjm’s picture

Status: Needs review » Reviewed & tested by the community

@larowlan, yep, adding it to the handbook was one of David's suggestions so I did that. That way it's there as a resource outside of just sites as well.

larowlan’s picture

Adding review credits for those who shaped the patch

  • larowlan committed 05b9f0a on 8.6.x
    Issue #2927344 by Wim Leers, xjm, webchick, larowlan, catch,...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed as 05b9f0a and pushed to 8.6.x.

Cherry-picked as d85dada and pushed to 8.5.x.

Thanks all

  • larowlan committed d85dada on 8.5.x
    Issue #2927344 by Wim Leers, xjm, webchick, larowlan, catch,...
tr’s picture

Status: Fixed » Needs review
StatusFileSize
new1.2 KB

Follow up - this removes the duplicate "If" in an inline comment that was added by the commit in #54/#56:

-    // Warn if still on PHP 5. If If at least PHP 7.0, relax from "warning" to
+    // Warn if still on PHP 5. If at least PHP 7.0, relax from "warning" to
lendude’s picture

Status: Needs review » Fixed

@TR nice catch, but please open up a new issue for that so that credit attribution works correctly. Of course feel free to post a link to the follow up here so people that worked on this can help out.

tr’s picture

Status: Fixed » Needs review

No, I'm not going to open a new issue - that will just get ignored by the people who made this mistake, and then the new issue will stay open for many years until the code gets rewritten and the patch is obsolete. (Think I'm exaggerating? I can give you a dozen examples ...) I don't give a crap about credit. Everyone makes mistakes, and the simplest thing to do is to fix it right here right now while it's still familiar to the participants.

David_Rothstein’s picture

Status: Needs review » Reviewed & tested by the community

For quick non-controversial followups I think it's fine to do it in the same issue rather than jumping through all the hoops to create a new one; I think that's one of the reasons "Fixed" issues can still be reopened (https://www.drupal.org/issue-queue/status#fixed).

The followup patch is fine; the rest of the original commit (and the documentation changes) looked good to me on a quick skim-through also.

  • larowlan committed 9b4915d on 8.6.x
    Issue #2927344 by Wim Leers, xjm, TR, webchick, larowlan,...

  • larowlan committed 9117bdb on 8.5.x
    Issue #2927344 by Wim Leers, xjm, TR, webchick, larowlan,...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed as 9b4915d and pushed to 8.6.x

Cherry-picked as 9117bdb and pushed to 8.5.x.

For quick non-controversial followups I think it's fine to do it in the same issue rather than jumping through all the hoops to create a new one

Agree

No, I'm not going to open a new issue - that will just get ignored by the people who made this mistake, and then the new issue will stay open for many years until the code gets rewritten and the patch is obsolete. (Think I'm exaggerating? I can give you a dozen examples ...) I don't give a crap about credit.

The tone here is borderline

Status: Fixed » Closed (fixed)

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