Skip to content

Conversation

@unixslayer
Copy link
Member

@unixslayer unixslayer commented Apr 18, 2025

  • upgrade to PHPUnit 10
  • remove enforcing time limit as it may mark tests as risky
  • test classes should be suffixed with Test
  • abstract Test classes should be suffixed with TestCase
  • remove remaining deprecations

@unixslayer
Copy link
Member Author

CC @prolic @basz

@basz
Copy link
Member

basz commented Apr 20, 2025

PHPUnit does not run abstract test classes so their naming does not matter in the context of PhpUnit. Test classes should end with Test by default. So to prevent a BC for consuming libraries (pdo-event-store) I believe we can keep the naming for the abstract classes as-is.

@unixslayer unixslayer force-pushed the phpunit-runner-compatibility branch 2 times, most recently from a89a621 to 807c790 Compare April 21, 2025 13:29
- upgrade to PHPUnit 10
- remove enforcing time limit as it may mark tests as risky
- test classes should be suffixed with `Test`
- abstract Test classes should be suffixed with `TestCase`
- remove remaining deprecations
@unixslayer unixslayer force-pushed the phpunit-runner-compatibility branch from 807c790 to d170f96 Compare April 21, 2025 14:21
@unixslayer
Copy link
Member Author

PHPUnit does not run abstract test classes so their naming does not matter in the context of PhpUnit. Test classes should end with Test by default. So to prevent a BC for consuming libraries (pdo-event-store) I believe we can keep the naming for the abstract classes as-is.

@basz PHPUnit does not run abstract test classes but their naming matters as starting from version 10 abstract test classes should be suffixed with TestCase resulting with a warning if not.

I noticed, some of the abstract test classes are extended in prooph/pdo-event-store. I will anyway continue this topic there in prooph/pdo-event-store#258 so eventual BC Breaks will be solved right after this PR.

@unixslayer
Copy link
Member Author

also, all bc-check fails seems to be caused by upgrading PHPUnit so I'd consider that as a false-positive

@basz basz merged commit 3683024 into prooph:7.x Apr 21, 2025
10 of 11 checks passed
@basz
Copy link
Member

basz commented Apr 21, 2025

i want to release as 7.12.3 with a note

Note: any abstract test classes have been renamed due to phpunit changes. Any tests depending on one of those should refactor

Think that's enough?

@unixslayer unixslayer deleted the phpunit-runner-compatibility branch April 21, 2025 18:00
@unixslayer
Copy link
Member Author

i want to release as 7.12.3 with a note

Note: any abstract test classes have been renamed due to phpunit changes. Any tests depending on one of those should refactor

Think that's enough?

@basz should be enough as tests should be considered as private. if someone extends them (beside prooph/pdo-event-store) they should be aware of possible and potential BC Breaks.

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