Skip to content

Conversation

@MasterOdin
Copy link
Member

@MasterOdin MasterOdin commented Oct 26, 2025

PR updates the phpunit dev dependency to ^10.5 which is the latest major version that supports 8.1, which phinx supports. At the moment, I don't think there's value in also doing something like was in #2371 where we try to support multiple phpunit versions, unless there's something that comes up that's only possible in phpunit 11+ (which to my knowledge we've not hit).

Signed-off-by: Matthew Peveler <[email protected]>
@dereuromark
Copy link
Member

It is actually quite easy to support all of them:
https://github.com/cakephp/cakephp/blob/87b366cb714f6872e5609a9749ccbfd529886c1b/composer.json#L65
Just can be done piece by piece, no need to do all at once.

Copy link
Member

@dereuromark dereuromark left a comment

Choose a reason for hiding this comment

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

Good first step

@MasterOdin
Copy link
Member Author

Given that PHPUnit seemingly always deprecates/removes something for every major version, and that this is a dev dependency, I have little interest in trying to support multiple versions of phpunit concurrently.

Signed-off-by: Matthew Peveler <[email protected]>
Signed-off-by: Matthew Peveler <[email protected]>
Signed-off-by: Matthew Peveler <[email protected]>
Signed-off-by: Matthew Peveler <[email protected]>
* @coversNothing
*/
abstract class AbstractConfigTest extends TestCase
abstract class AbstractConfigTestCase extends TestCase
Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed this as it wasn't a file that had tests, but rather something the concrete Config*Test files extended to make use of the same helper functions. phpunit 10 starting having a warning about this, so renaming to AbstractConfigTestCase seemed most in keeping with the naming scheme that phpunit uses, and avoids the warning.

if [[ ${{ matrix.prefer-lowest != 'prefer-lowest' }} ]]; then
export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=coverage.xml
export CODECOVERAGE=1 && vendor/bin/phpunit --coverage-clover=coverage.xml
Copy link
Member Author

Choose a reason for hiding this comment

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

I think the biggest change would be no longer printing out the skipped tests, but I think that's actually preferable as they were essentially just noise for the most part and something to annoyingly scroll past to see actual test errors.

If we wanted to bring back the behavior, can use the new --display-skipped flag or displayDetailsOnSkippedTests XML option.

@MasterOdin MasterOdin merged commit d59d999 into 0.x Oct 26, 2025
11 of 12 checks passed
@MasterOdin MasterOdin deleted the chore-phpunit branch October 26, 2025 20:14
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.

3 participants