fbett / le-acme2-php

LetsEncrypt client library for ACME v2 written in PHP.
MIT License
30 stars 15 forks source link

PHP 7.1 compatibility #11

Closed rlankhorst closed 3 years ago

rlankhorst commented 3 years ago

Hi @fbett,

In your readme the minimum version is 7.1, but in the composer files 7.3 is required. A quick check showed that the code basically runs on 7.1, except for this line: https://github.com/fbett/le-acme2-php/blob/master/src/LE_ACME2/Authorizer/AbstractAuthorizer.php#L52

where removing the comma fixes the error I had. I did not run into other issues yet. Would you consider extending support to 7.1?

fbett commented 3 years ago

Hi @rlankhorst,

thx for this hint. The readme is updated (09fe88ba83dc12b3711c0e11b9144846092cd70b)

I honor heavily the new way to declare types in PHP 7.3 and 7.4. I can't wait for the end of support for PHP 7.3 to use the features of 7.4. The declaration of types should rise the quality level, beside using unit tests.

Could you tell me something about your environment and why you are using 7.1 anymore? The EOL for PHP 7.1 was reached about 18 months ago.

I know there are some special configurations where it is difficult to upgrade PHP. But the most linux distributions offer nice ways to upgrade PHP on older versions (f.e. by using apt "backports" sources).

If only your CLI PHP version to clone the project is too old, but your runtime PHP version is high enough: you could use the composer parameter "--ignore-platform-reqs"

rlankhorst commented 3 years ago

Hi @fbett,

Thanks for your response.

I'd like to use it for integration in the WordPress plugin Really Simple SSL, to allow users to generate their own free certificate. But in WordPress there are still a lot of users with older PHP versions.

Extending it to 7.1 would just enable the service for a wider range of users, that's all. As far as I can see it works with php 7.1 after changing the mentioned ",".