Annotations for PHP 8.1 compatibility and GitHub actions CI#373
Annotations for PHP 8.1 compatibility and GitHub actions CI#373treffynnon merged 20 commits intomasterfrom
Conversation
treffynnon
commented
Jul 18, 2022
- Update to support PHP 8.1 [edlerd and aaronpk] - issue #370 and issue #372
- GitHub actions used to perform unit testing/CI [Treffynnon]
457ae3e to
f99e2d6
Compare
f99e2d6 to
5d6d28b
Compare
|
Two steps allow tests to run with phpunit 8.5 and php 8.1:
For the first step, source-level compatibility for newer and older phpunit can be achieved by +if (!class_exists('PHPUnit_Framework_TestCase')) {
+ class_alias('\PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase');
+}However, for the second step, source-level compatibility seems impossible for both newer and older PHP. PHP >= 8.0 requires compatible return types [1], while PHP < 7.0 does not recognize return types [2]. I'm afraid idiorm needs to use a magic like [1] https://php.watch/versions/8.0/lsp-errors |
33a0c8d to
8844e41
Compare
7e261c4 to
789350b
Compare
789350b to
a5c48d8
Compare
|
Nice - thanks for your help - I think we have a PR we can merge now. |
|
Glad to help :) |