test: update tests and config for PHPUnit 9.5.x#175
test: update tests and config for PHPUnit 9.5.x#175claylo wants to merge 1 commit intogetopt-php:masterfrom claylo:master
Conversation
|
I would like to merge this but I'm afraid it will fail with php7.1 because phpunit 9.5 is not compatible. but compatibility with php8 is definitely a thing... Do we need so many changes? can we not just add it to the composer.json? |
|
Hi Thomas, Since PHPUnit 9 is only a requirement for running the tests, I don't believe there's a need to change the PHP 7.1 requirement. I updated composer.json to allow installation of PHPUnit 9 ... not only with the PHPUnit version itself, but also the "PHP" requirement of I updated the No functional changes were made to anything -- this was all just so I could run the test suite with PHPUnit 9 and PHP 8. :) You are correct that these tests won't run on PHP 7.1 (per PHPUnit 9's supported versions), but both PHP 7.1 and PHPUnit 7 are over 2 years out of date. I'll understand if you don't want to merge this on those grounds, however. I've been using the library successfully and happily on PHP 8.1.3, so installing the package in my project with 8.1.3 has not been an issue at all. |
|
I've merged your changes to a branch on this repo so that CI get's executed: https://gitlab.com/thflori/getopt-php/-/pipelines/490096079 As you can see the tests are now not working in php 7.1 and 7.2 because of the php requirement from phpunit. I additionally removed the custom printer, selected any phpunit and added a printer that works in all phpunit versions: Unfortunately there is an issue with limedeck/phpunit-detailed printer - so that this also fails on php 7.1 and php 7.2: |
All tests run now with PHPUnit 9.5.18 + text report of code coverage (tested with ext-pcov).