swaggest / php-json-schema

High definition PHP structures with JSON-schema based validation
MIT License
446 stars 50 forks source link

Patch phpunit to allow testing in PHP 8.1 #131

Closed vearutop closed 3 years ago

vearutop commented 3 years ago

Resolves #130.

PHP 8.1 introduced strict requirement to match function header when implementing an interface, unfortunately this makes a breaking change for older versions of PHP without any meaningful benefit. Fortunately these requirements can be suppressed, which was done in this PR.

This PR adds PHP 8.1 to CI pipeline, downgrades to older phpunit to support PHP 5.4 and patches phpunit to support PHP 8.1.

github-actions[bot] commented 3 years ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
JSON 22 5315 (-1) 5315 (-1) 0 0 0 145.7K (-33B)
Makefile 1 38 (+6) 27 (+4) 0 11 (+2) 7 2.2K (+212B)
Markdown 2 636 (+6) 488 (+4) 0 148 (+2) 0 20K (+173B)
PHP 133 11161 (+18) 8067 (+2) 1495 (+14) 1599 (+2) 559 323.2K (+596B)
Patch 1 (+1) 167 (+167) 149 (+149) 0 18 (+18) 0 5.5K (+5.5K)
YAML 4 147 132 1 14 0 3.7K (+101B)
codecov[bot] commented 3 years ago

Codecov Report

Merging #131 (94f1e47) into master (1d7cce2) will increase coverage by 0.10%. The diff coverage is n/a.

:exclamation: Current head 94f1e47 differs from pull request most recent head a832b98. Consider uploading reports for the commit a832b98 to get more accurate results Impacted file tree graph

@@             Coverage Diff              @@
##             master     #131      +/-   ##
============================================
+ Coverage     92.53%   92.64%   +0.10%     
============================================
  Files            27       27              
  Lines          1688     1686       -2     
============================================
  Hits           1562     1562              
+ Misses          126      124       -2     
Impacted Files Coverage Δ
src/Constraint/Properties.php 85.71% <ø> (ø)
src/MagicMapTrait.php 83.78% <ø> (ø)
src/Structure/ClassStructureTrait.php 95.83% <ø> (ø)
src/Structure/ObjectItemTrait.php 76.19% <ø> (+2.34%) :arrow_up:
src/Wrapper.php 59.01% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1d7cce2...a832b98. Read the comment docs.