Uh oh!
There was an error while loading. Please reload this page.
[PHPUnit 10] Rename assertObjectHasAttribute() to assertObjectHasProperty(), add AssertIssetToAssertObjectHasPropertyRector - #338
Merged
Conversation
TomasVotrubaforce-pushed
the
tv-test-provider
branch
from
June 22, 2024 05:04
89c5949 to
87ece0dCompareTomasVotrubaforce-pushed
the
tv-test-provider
branch
2 times, most recently
from
June 22, 2024 05:25
1e207dd to
4d06c8aCompareTomasVotrubaforce-pushed
the
tv-test-provider
branch
2 times, most recently
from
June 22, 2024 05:28
3f83aab to
0dcfb32CompareTomasVotrubaforce-pushed
the
tv-test-provider
branch
from
June 22, 2024 05:30
0dcfb32 to
6557da6CompareTomasVotruba
enabled auto-merge (squash)
June 22, 2024 05:31
samsonasik
commented
Jun 22, 2024
Member
@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 |
| // https://github.com/sebastianbergmann/phpunit/issues/5220 | ||
| new MethodCallRename('PHPUnit\Framework\Assert', 'assertObjectHasAttribute', 'assertObjectHasProperty'), | ||
| new MethodCallRename('PHPUnit\Framework\Assert', 'assertObjectNotHasAttribute', 'assertObjectHasNotProperty'), |
Member
There was a problem hiding this comment.
the method seems should be assertObjectNotHasProperty, see https://github.com/sebastianbergmann/phpunit/blob/bb24b2746512bc8be5122bb220064df8f8687451/src/Framework/Assert.php#L1052C34-L1052C60
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Closeshttps://github.com/rectorphp/rector-phpunit/issues/336