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

assertObjectHasProperty is not documented in 9.6, nor is the deprecation of assertObjectHasAttribute #5448

Closed
joachim-n opened this issue Jul 18, 2023 · 1 comment
Labels
version/9 Something affects PHPUnit 9

Comments

@joachim-n
Copy link

Q A
PHPUnit version 9.6
PHP version 8.1
Installation Method Composer

Summary

https://docs.phpunit.de/en/9.6/assertions.html# does not have documentation for assertObjectHasProperty.

I got a deprecation warning for assertObjectHasAttribute and this was where I went to read docs about the new method.

Current behavior

How to reproduce

Expected behavior

@joachim-n joachim-n added type/bug Something is broken version/9 Something affects PHPUnit 9 labels Jul 18, 2023
@joachim-n
Copy link
Author

Ok, I see it's not documented because it doesn't exist in PHPUnit 9.6!

Why show a deprecation warning for something I can't do anything about yet?

@sebastianbergmann
Copy link
Owner

Why show a deprecation warning for something I can't do anything about yet?

The warning informs you that assertObjectHasAttribute() is deprecated in PHPUnit 9. There is nothing you need to do about this until you migrate to PHPUnit 10.

The PHPUnit-Polyfills project offers a polyfill for assertObjectHasProperty() that you may use if you want to do something while you are still using PHPUnit 9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version/9 Something affects PHPUnit 9
Projects
None yet
Development

No branches or pull requests

2 participants