singpolyma / openpgp-php

OpenPGP.php is a pure-PHP implementation of the OpenPGP Message Format (RFC 4880).
http://singpolyma.github.io/openpgp-php/
The Unlicense
179 stars 69 forks source link

Phpunit9 #109

Closed jstanden closed 3 years ago

jstanden commented 3 years ago

Please see the discussion in #107.

The current version-locked PHPUnit dependency uses the each() function, which has been removed in PHP 8.

This PR would work best if the 0.x versions continue to support PHP 5.4 (if desirable), and a new 1.x release line supports PHP 7.4 and 8.x.

The former PR (#108) just adds PHP 8.0 to the supported versions in Composer without updating these unit tests.

singpolyma commented 3 years ago

I am ok to support only PHP 7.3+ going forward. I would not like to gratuitously break backward compatibility for older versions in the library, but for the test and CI I am ok to move to 7.3+ only. Please update the travis config in this PR to remove pre-7.3 versions and also to start testing newer versions (travis currently is only testing up to 7.4). Once travis passes 7.3-8.0 I will merge this PR.

Thanks!

jstanden commented 3 years ago

👍 Thanks! I'm on it.

jstanden commented 3 years ago

I modified .travis.dhall and used dhall-to-yaml-ng to build the new .travis.yml. I'm verifying the new tests on TravisCI from my fork now. I'll report back shortly.

jstanden commented 3 years ago

I had to update the Travis build file to use Ubuntu Xenial (16.04) rather than Trusty (14.04), since the latter doesn't have a PHP 8.0 package. Since tests are running on PHP 7.3+ now, Ubuntu could probably be bumped up to Bionic (18.04) or Focal (20.04). I just followed convention and used the oldest one that supported all versions.

I'm re-running those last few tests and we should be good.

jstanden commented 3 years ago

Alright, all the tests pass in Travis with PHP 7.3, 7.4, and 8.0 using PHPUnit 9.5.