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

Support for PHPUnit 11 #80

Open
dmaicher opened this issue Feb 26, 2024 · 4 comments
Open

Support for PHPUnit 11 #80

dmaicher opened this issue Feb 26, 2024 · 4 comments

Comments

@dmaicher
Copy link

Version 11 has been released so we should add compatibility.

Possibly its as easy as just allowing ^11.0 without any further changes? 🤔 I can take a look.

@jrfnl
Copy link
Collaborator

jrfnl commented Feb 26, 2024

Eh.. not really... been upgrading some other codebases and it's a pain (that is, if you want to fail the tests on deprecations as that means you have to fix all the PHPUnit deprecation notices and that's turned out to be a lot of work....).

I've also been wondering about the future of this package, now PHPUnit 11 has added some closely related assertions ?
The PHPUnit Polyfills (v3) will support the new assertions all the way back to PHPUnit 6.x.

@dmaicher
Copy link
Author

Indeed there are some test fails with PHPUnit 11 🙈

There was 1 error:

1) DMS\PHPUnitExtensions\ArraySubset\Tests\Unit\Constraint\ArraySubsetTest::testEvaluateFailMessage
Error: Call to undefined method DMS\PHPUnitExtensions\ArraySubset\Constraint\ArraySubset::exporter()

/var/www/phpunit-arraysubset-asserts/src/Constraint/ArraySubset.php:110
/var/www/phpunit-arraysubset-asserts/src/Constraint/ArraySubset.php:125
/var/www/phpunit-arraysubset-asserts/src/Constraint/ArraySubset.php:100
/var/www/phpunit-arraysubset-asserts/tests/Unit/Constraint/ArraySubsetTest.php:88

--

There were 2 failures:

1) DMS\PHPUnitExtensions\ArraySubset\Tests\Unit\AssertTest::testAssertArraySubsetPassesStrictConfig
Failed asserting that exception of type "Error" matches expected exception "PHPUnit\Framework\ExpectationFailedException". Message was: "Call to undefined method DMS\PHPUnitExtensions\ArraySubset\Constraint\ArraySubset::exporter()" at
/var/www/phpunit-arraysubset-asserts/src/Constraint/ArraySubset.php:110
/var/www/phpunit-arraysubset-asserts/src/Constraint/ArraySubset.php:125
/var/www/phpunit-arraysubset-asserts/src/Constraint/ArraySubset.php:100
/var/www/phpunit-arraysubset-asserts/src/ArraySubsetAsserts.php:83
/var/www/phpunit-arraysubset-asserts/tests/Unit/AssertTest.php:26
.

2) DMS\PHPUnitExtensions\ArraySubset\Tests\Unit\AssertTest::testAssertArraySubsetThrowsExceptionForInvalidSubset
Failed asserting that exception of type "Error" matches expected exception "PHPUnit\Framework\ExpectationFailedException". Message was: "Call to undefined method DMS\PHPUnitExtensions\ArraySubset\Constraint\ArraySubset::exporter()" at
/var/www/phpunit-arraysubset-asserts/src/Constraint/ArraySubset.php:110
/var/www/phpunit-arraysubset-asserts/src/Constraint/ArraySubset.php:125
/var/www/phpunit-arraysubset-asserts/src/Constraint/ArraySubset.php:100
/var/www/phpunit-arraysubset-asserts/src/ArraySubsetAsserts.php:83
/var/www/phpunit-arraysubset-asserts/tests/Unit/AssertTest.php:32

@jrfnl
Copy link
Collaborator

jrfnl commented Mar 11, 2024

@dmaicher If that's all, then there is most likely something wrong with the config.

@matthiasPOE
Copy link

Any updates on this?

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 a pull request may close this issue.

3 participants