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

chore: update phpunit and misc maintenance #241

Merged
merged 10 commits into from
Mar 20, 2024

Conversation

mfn
Copy link
Contributor

@mfn mfn commented Mar 20, 2024

Description

This PR only touches test infrastructure, no library code!

  • remove phpunit 9 and add support for phpunit 11
    we need to keep phpunit 10.5 for the lowest PHP/Laravel combination
    Note: must be minimum 10.5 otherwise it emits XML validation warnings which apparently have been fixed in later releases
  • remove all @test annotations and just use the test* prefix
    • annotations are emitting a deprecation notice in phpunit 11, getting removed in phpunit 12
    • I could have replaced them with annotations
    • but I figured it's less "typing" just using test*
  • removed a couple of unnecessary phpdoc (return,var,param)
  • github actions:
    • only run coverage when we actually collect
      As of now, all matrix job where running coverage for no reason
    • use latest PHP/Laravel version when collecting coverage
    • removed matrix.os, was always the same value 🤷🏼

Lastly, I changed the job names from:
image

to
image

It may not look as pretty but you can finally see all the variables.

Yeah, I maybe went a bit overboard but sometimes it hard to stop :) Also: since I only touched tests and everything is "green", it's low-to-no risk.

Checklist:

  • I've added tests for my changes or tests are not applicable
  • I've changed documentations or changes are not required
  • I've added my changes to CHANGELOG.md

mfn added 10 commits March 20, 2024 07:20
aka remove 9.4
Otherwise, with stability=prefer-lowest we would get this phpunit warning:
```
There were 2 PHPUnit warnings:

1) Test results may not be as expected because the XML configuration file did not pass validation:

  Line 26:
  - Element 'source': This element is not expected.

2) No filter is configured, code coverage will not be processed
```
Seems this was fixed in later releases.
@Messhias Messhias merged commit f794dbe into PHP-Open-Source-Saver:main Mar 20, 2024
12 checks passed
@mfn mfn deleted the mfn-phpunit branch March 20, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants