Skip to content

Conversation

@W0rma
Copy link
Contributor

@W0rma W0rma commented Feb 14, 2025

PHPUnit 12 removed the possibility to mock abstract classes (sebastianbergmann/phpunit#5314)

I noticed a quite cryptic error message if I try to mock an abstract class:

call_user_func_array(): Argument #1 ($callback) must be a valid callback, class PHPUnit\Framework\MockObject\Generator\Generator does not have a method "mockObjectForAbstractClass"

With this PR the error message will be "PHPUnit 12 or greater does not allow to mock abstract classes anymore".

@SamMousa
Copy link
Contributor

LGTM!

@SamMousa SamMousa merged commit 5fd4172 into Codeception:master Feb 14, 2025
6 checks passed
@W0rma W0rma deleted the abstract-classes branch February 14, 2025 10:25
@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

🎉 This PR is included in version 4.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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