Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to PHPUnit 8; bump required PHP to 7.2+; fix Travis tests on PHP 7.4 #1127

Merged
merged 4 commits into from
Mar 10, 2021

Conversation

osma
Copy link
Member

@osma osma commented Mar 3, 2021

We have been using obsolete PHPUnit 7, which is not compatible with PHP 7.4 and is no longer supported.
This PR upgrades to PHPUnit 8, which is still supported (but only in Life Support mode).
It requires PHP 7.2, so this PR drops support for PHP 7.1 and attempts to get Travis CI tests working on PHP 7.4.

Some tests had to be modified (add void return types for setUp and tearDown methods) to keep PHPUnit 8 happy. There are warnings about deprecated PHPUnit features that should be addressed as well but they are not fatal (yet).

Fixes #920

@osma osma added this to the 2.10 milestone Mar 3, 2021
@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

Merging #1127 (adbe7ac) into master (1fc53b3) will increase coverage by 7.52%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1127      +/-   ##
============================================
+ Coverage     60.38%   67.90%   +7.52%     
+ Complexity     1584     1583       -1     
============================================
  Files            32       32              
  Lines          4377     3889     -488     
============================================
- Hits           2643     2641       -2     
+ Misses         1734     1248     -486     
Impacted Files Coverage Δ Complexity Δ
model/DataObject.php 77.50% <100.00%> (-0.55%) 22.00 <0.00> (-1.00)
model/Model.php 83.68% <100.00%> (+2.15%) 105.00 <0.00> (ø)
model/VocabularyCategory.php 93.33% <100.00%> (ø) 7.00 <0.00> (ø)
model/sparql/GenericSparql.php 92.12% <100.00%> (+24.19%) 319.00 <0.00> (ø)
model/ConceptPropertyValue.php 86.74% <0.00%> (-1.21%) 47.00% <0.00%> (ø%)
model/Request.php 67.07% <0.00%> (+0.80%) 50.00% <0.00%> (ø%)
model/VocabularyConfig.php 94.00% <0.00%> (+0.82%) 89.00% <0.00%> (ø%)
model/PluginRegister.php 70.14% <0.00%> (+1.03%) 28.00% <0.00%> (ø%)
model/Vocabulary.php 87.85% <0.00%> (+1.05%) 112.00% <0.00%> (ø%)
... and 16 more

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 1fc53b3...adbe7ac. Read the comment docs.

@osma
Copy link
Member Author

osma commented Mar 3, 2021

Tests are still failing on PHP 7.4. I think EasyRdf needs to be upgraded first...

@osma
Copy link
Member Author

osma commented Mar 3, 2021

EasyRdf update in PR #1128 needs to be merged first, then I can continue working on this PR.

@osma osma force-pushed the issue920-tests-for-php74 branch from 062f920 to 10a40ca Compare March 10, 2021 10:17
@osma
Copy link
Member Author

osma commented Mar 10, 2021

Rebased on current master branch and force-pushed.

The PHPUnit 8 deprecation warnings should now be fixed; waiting for Travis CI tests to finish.

@sonarcloud
Copy link

sonarcloud bot commented Mar 10, 2021

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
9.3% 9.3% Duplication

@osma osma marked this pull request as ready for review March 10, 2021 10:56
@osma osma requested a review from kouralex March 10, 2021 10:56
Copy link
Contributor

@kouralex kouralex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent PR! This indeed fixes Travis tests for PHP7.4. Testing with PHP 7.2, everything is working.

I did not notice any regressions in code changes, only improvements.

I will mark this PR ready for merging. Good job!

@osma osma merged commit a201ace into master Mar 10, 2021
@osma osma deleted the issue920-tests-for-php74 branch March 10, 2021 12:04
@osma osma changed the title Upgrade to PHPUnit 8; bump required PHP to 7.2+; try to fix Travis tests on PHP 7.4 Upgrade to PHPUnit 8; bump required PHP to 7.2+; fix Travis tests on PHP 7.4 Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failures on PHP 7.4
2 participants