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 9, drop PHP 7.2 support #1312

Merged
merged 6 commits into from
Apr 28, 2022
Merged

Upgrade to PHPUnit 9, drop PHP 7.2 support #1312

merged 6 commits into from
Apr 28, 2022

Conversation

osma
Copy link
Member

@osma osma commented Apr 27, 2022

Reasons for creating this PR

We want to upgrade to PHPUnit 9 in order to stay up to date. It requires at minimum PHP 7.3, so this PR will also drop support for PHP 7.2.

Link to relevant issue(s), if any

Description of the changes in this PR

  • upgrade to PHPUnit 9.5.* (from 8.5.*) in composer.json and in GitHub Actions CI workflow
  • migrate phpunit.xml configuration file using PHPUnit built in migration tool
  • avoid using the deprecated expectException with PHP Errors, use expectError instead
  • fix an invalid coverage annotation that wasn't previously noticed
  • disable running GitHub Actions CI tests under PHP 7.2
  • remove the rules that prevented collecting code coverage on PHP 8.0 (it didn't work under PHPUnit 8 but now works)

Known problems or uncertainties in this PR

none so far 🤞

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if not, explain why below)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@osma osma added this to the 2.15 milestone Apr 27, 2022
@osma osma self-assigned this Apr 27, 2022
@osma osma changed the title Upgrade to PHPUnit 9 Upgrade to PHPUnit 9, drop PHP 7.2 support Apr 27, 2022
@sonarcloud
Copy link

sonarcloud bot commented Apr 27, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Apr 27, 2022

Codecov Report

Merging #1312 (50965a4) into master (863b7cb) will increase coverage by 0.92%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1312      +/-   ##
============================================
+ Coverage     69.44%   70.36%   +0.92%     
+ Complexity     1656     1649       -7     
============================================
  Files            32       32              
  Lines          4068     3790     -278     
============================================
- Hits           2825     2667     -158     
+ Misses         1243     1123     -120     
Impacted Files Coverage Δ
controller/Honeypot.php 40.90% <0.00%> (-7.10%) ⬇️
model/resolver/LOCResource.php 55.55% <0.00%> (-4.45%) ⬇️
model/sparql/JenaTextSparql.php 90.00% <0.00%> (-2.00%) ⬇️
model/resolver/WDQSResource.php 92.85% <0.00%> (-1.59%) ⬇️
model/sparql/GenericSparql.php 91.27% <0.00%> (-0.98%) ⬇️
model/PluginRegister.php 71.76% <0.00%> (-0.86%) ⬇️
model/VocabularyConfig.php 95.48% <0.00%> (-0.70%) ⬇️
model/ConceptMappingPropertyValue.php 82.82% <0.00%> (-0.51%) ⬇️
controller/RestController.php 22.38% <0.00%> (-0.38%) ⬇️
model/ConceptProperty.php 96.42% <0.00%> (ø)
... and 3 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 863b7cb...50965a4. Read the comment docs.

Copy link
Contributor

@joelit joelit left a comment

Choose a reason for hiding this comment

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

Tested locally, works fine! :)

@osma osma merged commit 712ead2 into master Apr 28, 2022
@osma osma deleted the issue1291-phpunit-9 branch April 28, 2022 11:41
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.

Drop support for PHP 7.2, upgrade to PHPUnit 9
2 participants