Problem/Motivation
Currently, two places in core about the PHP requirements link https://www.drupal.org/docs/9/how-drupal-9-is-made-and-what-is-included/... and refer to it as the "Environment requirements of Drupal 9". That was a temporary page for Drupal 9 development and has since been deprecated.
A third place links the old Drupal-8-specific URL alias, https://www.drupal.org/docs/8/system-requirements/php, and furthermore even refers to it as the "Drupal 8 PHP requirements handbook page", which is truly confusing on Drupal 9.
The correct link is https://www.drupal.org/docs/system-requirements/php-requirements.
Proposed resolution
Use the correct link, and refer to it as the "Drupal PHP requirements" (without any specific major version) since it now covers all (8+) major versions. That way the documentation doesn't constantly get stale and out of sync.
User interface changes
String changes to link text for three strings. Current link is used in all three places.
API changes
None.
Data model changes
None.
Release notes snippet
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #29 | 3261611-29.patch | 5.03 KB | ravi.shankar |
| #27 | interdiff_3261611_2-27.txt | 3.79 KB | andregp |
| #27 | 3261611-27.patch | 5.03 KB | andregp |
| #24 | 3261611-24.patch | 5.09 KB | andregp |
| #24 | interdiff_3261611_2-24.txt | 1.4 KB | andregp |
Comments
Comment #2
xjmComment #3
gábor hojtsyLooks good. Since we are changing this string, it would be great to move the PHP.net link to a placeholder as well, so we can change it if need be without needing to change the translations and also to make sure translators don't change it accidentally.
Comment #4
xjmThanks @Gábor Hojtsy. Regarding:
PHP.net is available in multiple languages, so that's why links to it (here and elsewhere) are purposefully included in the string itself. That way, translators can change it from the English translation to the local translation. (At least, that's what we've discussed the previous times these and similar links have been updated.)
I'm open to changing that, especially if the localization behavior of PHP.net itself has gotten smarter in recent years, but I think that's out of scope here because there are many other places in core where we put the PHP.net link in the string itself rather than a placeholder.
Comment #5
gábor hojtsyhttps://www.php.net/supported-versions.php is not within the manual. The manual is available in multiple languages but other pages are not. (I was heavily involved 20 years ago to create the php.net docs translation system, see https://www.php.net/manual/en/preface.php#contributors, and it still seems to use mostly the same system logic :D)
I understand there may be other links in core to non php.net manual pages though.
The patch looks good then :)
Comment #6
xjmPosted #3261623: Decide whether to move various PHP.net links into placeholders rather than the string itself in case we want to discuss more what links go into the strings vs. not (for PHP.net or generally).
Comment #7
quietone commentedThe changed strings are correct and it is an improvement, it removes 'handbook' from the strings as well as updating Drupal version as needed. I applied that patch and checked the links - all good.
It is odd that the string in system.install uses the possessive form with PHP but not with Drupal, and Drupal has 'page' following it and PHP doesn't. Since that is the way the original string is, that does not block this being committed.
I also wonder if the category is 'documentation' or 'user interface text'.
I discussed the first item with xjm on a call. She immediately pointed out there is a reason the term "PHP's" is used. And then walked through finding the issue that introduce the possessive form to this string. The key feature of the git archaeology was using '
git log -L', in this casegit log -L198,204:core/modules/system/system.install. From that she found the comment before the change. That and the following comment explains that the possessive is used to make it clear that this is the official PHP documentation and not documentation for Drupal or an HSP.We discussed making a followup to consider changing the use of the possessive form. While I don't like "PHP's" I can live with it and would have left it at that. But xjm did the right thing and considered if it fit in the scope of existing issues and found #3261606: Provide more specific messaging about the consequences of using an unsupported PHP version. I'll make a comment there about whether to use "PHP's" or not.
The question about category was missed. Will get to that next.
Comment #8
quietone commentedxjm responded in Slack that she agrees with changing the component.
edit: fix typo
Comment #9
xjm@quietone noticed that the patch does not apply to 10.0.x. (This is because the installer hardcodes the PHP version in this string, so of course it is different for the different PHP requirement.)
Here's a 10.0.x version.
Comment #10
xjmSaving issue credits.
Comment #12
xjmhttps://www.drupal.org/pift-ci-job/2312407 shows a fail in
rupal\Tests\layout_builder\FunctionalJavascript\ContentPreviewToggleTest, which is one of the JS tests with an increased fail rate recently. It has failed in HEAD 10 times in the past week on various environments and branches. See reference to it in #2829040-142: [meta] Known intermittent, random, and environment-specific test failures.Therefore, queuing another test run.
Comment #13
xjm(Just undoing the bot fail.)
Comment #14
quietone commentedOops, this is missing the period at the end of 8.0.2.
Comment #15
xjmAddressing #14.
Since it is the smallest theoretically possible change, going to go ahead and re-RTBC assuming tests pass etc.
Comment #16
alexpottNeeds a reroll because in the meantime the minimum PHP version of Drupal 10 has changed.
Comment #17
suresh prabhu parkala commentedA re-rolled patch against the latest 9.4.x.
Comment #18
suresh prabhu parkala commentedComment #19
ranjith_kumar_k_u commentedRe-rolled #17 for 10.0.
Comment #20
ranjith_kumar_k_u commentedComment #21
alexpottRe #17 - the D9 patch in #2 is still the correct patch for Drupal 9. The minimum PHP version has not changed there yet and the message in #17 is not consistent with the check immediately above it.
Comment #22
alexpottHere's an idea for how to make things a bit simpler in the future when minimum PHP changes... opened as a follow up... #3266523: Use core/composer.json to get minimum PHP in install.php.
Comment #23
quietone commentedI applied the 9.4.x patch and did the following search
The title here is to fix the PHP requirements links so I think it is within scope for fix these references as well.
Comment #24
andregp commentedReplaced the remaining links from the 9.4.x patch as per #23.
(I used the patch #2 as the base for the interdiff because @alexpott commented that "patch in #2 is still the correct patch for Drupal 9". (see #21)).
Comment #25
andregp commentedI forgot to update the status.
Comment #26
quietone commentedPatch failed to apply.
Comment #27
andregp commented@quietone sorry, my repo wasn't up to date.
Here is the patch.
Comment #28
quietone commented@andregp, no worries. I reckon we have all done that.
The patch in #27 for 9.4.x looks good, I applied and checked using the grep command in #23.
Now we need a patch for 10.0.x
Comment #29
ravi.shankar commentedAdded a parch for Drupal 10.0.x.
Comment #30
murilohp commentedI was reviewing #29, and did the following searches:
The first one is the same from #23
$ grep -r "docs/8/system-requirements" coreNo results, so it's fine.
The second search was:
My idea was to find any references of drupal 9(of course I found a lot but the two results above got me), I know this is not part of the scope of this issues, but do you have any issue to address the update of the links above(for D10 only)?
The patch looks good, the testbot is happy so it's RTBC for me!
FYI: If you're trying to test the patches locally and you composer is generating a
platform_check.phpwith the correct PHP version expected (eg: 8.1 for d10 and 7.3 for d9) you can hack the file just to see the drupal messages being displayed in your screen.Comment #31
quietone commented@murilohp, thanks for the review and RTBC. I don't think there is a specific issue for D10, there is a Meta though, #2855175: [META] Many documentation / handbook URLs redirect to D7 content.
Comment #33
xjmHEAD was broken for 10.0.x. Retesting and restoring status.
Comment #35
andregp commentedAnother random failure. The retest passed so restoring status.
Comment #36
xjmFor #30, some work needs to be done to make that handbook section include updates to D10. I'll file a followup.
Comment #37
xjmFollowup: #3271874: Update handbook guide for updating to D9 to be generalized for D10 and future major updates.
Comment #38
murilohp commentedThanks for the responses @quietone and @xjm!
Comment #39
quietone commentedAll feedback has been addressed, including making a followup for wiki changes.
This looks ready to commit to me. I'll wait for another committer to confirm.
Comment #42
gábor hojtsyWoot, thanks all! Committed to 10.x and 9.4.x.