-
Notifications
You must be signed in to change notification settings - Fork 47
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
[PHPUnit 10] Rename assertObjectHasAttribute() to assertObjectHasProperty(), add AssertIssetToAssertObjectHasPropertyRector #338
Conversation
89c5949
to
87ece0d
Compare
1e207dd
to
4d06c8a
Compare
3f83aab
to
0dcfb32
Compare
0dcfb32
to
6557da6
Compare
@TomasVotruba I tried in CodeIgniter4 project,it got error: undefined
It uses PHPUnit 10.5.24
Looking on the repo, it seems there is no method named |
@@ -29,6 +29,10 @@ | |||
// https://github.com/sebastianbergmann/phpunit/issues/4087 | |||
new MethodCallRename('PHPUnit\Framework\Assert', 'assertRegExp', 'assertMatchesRegularExpression'), | |||
|
|||
// https://github.com/sebastianbergmann/phpunit/issues/5220 | |||
new MethodCallRename('PHPUnit\Framework\Assert', 'assertObjectHasAttribute', 'assertObjectHasProperty'), | |||
new MethodCallRename('PHPUnit\Framework\Assert', 'assertObjectNotHasAttribute', 'assertObjectHasNotProperty'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the method seems should be assertObjectNotHasProperty
, see https://github.com/sebastianbergmann/phpunit/blob/bb24b2746512bc8be5122bb220064df8f8687451/src/Framework/Assert.php#L1052C34-L1052C60
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHPUnit 10 removed
assertObjectHasAttribute()
, with no replacement.Then PHPUnit 10.1 introduced
assertObjectHasProperty()
as 1:1 replacement.Instead of migrating methods twice back and forth, we'll simple rename it.
See sebastianbergmann/phpunit#5220
Closes #336