(dev/drupal#79) Update PHP version checks #51
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
If you install or upgrade CiviCRM 5.16+ on PHP 5.x, then it produces a syntax error:
It is correct to raise an error, but the error should be more digestable -- i.e. telling the user that their version of PHP is in compatible.
See also: https://lab.civicrm.org/dev/drupal/issues/79
Comments
This patch has two parts:
I started working on this patch after doing a dozen similar PRs for the different repos+branches, and I finally conked out in civicrm-joomla after the 4th iteration of re-running distmaker. I'm pretty sure this is better than before, but I ran out patience and suspect there are still some scenarios producing the uglier message.
(It should be possible to target a different branch by editing the PR header -- but for the moment, I targetted
master
because I'm not sure when this'll be reviewed.)