Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(dev/drupal#79) Update PHP version checks #51

Merged
merged 1 commit into from
May 24, 2022

Conversation

totten
Copy link
Member

@totten totten commented Aug 22, 2019

Overview

If you install or upgrade CiviCRM 5.16+ on PHP 5.x, then it produces a syntax error:

Error: syntax error, unexpected ':', expecting '{'
in <...>/civicrm/vendor/league/csv/src/functions.php, line 33

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:

  • Pro-forma changes to existing PHP version checks (s/5.3.4/7.0.0/)
  • An additional check which addresses some scenario (installer?) which was still had the ugly error

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.)

Overview
--------

If you install or upgrade CiviCRM 5.16+ on PHP 5.x, then it produces a syntax error:

```
Error: syntax error, unexpected ':', expecting '{' in <...>/civicrm/vendor/league/csv/src/functions.php, line 33
```

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.

Comments
--------

This patch has two parts:

* Pro-forma changes to existing PHP version checks (s/5.3.4/7.0.0/)
* An additional check which addresses some scenario (installer?) which was still had the ugly error

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.
@mlutfy mlutfy merged commit 18bc43a into civicrm:master May 24, 2022
@mlutfy
Copy link
Member

mlutfy commented May 24, 2022

This seemed like a convenient and really minor change, so merged based on code review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants