-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
feature/test-doublesTest Stubs and Mock ObjectsTest Stubs and Mock Objectstype/change-in-php-requires-adaptationA change in PHP requires a change so that existing PHPUnit functionality continues to workA change in PHP requires a change so that existing PHPUnit functionality continues to work
Description
| Q | A |
|---|---|
| PHPUnit version | 8.5 |
| PHP version | 8.1 |
| Installation Method | Composer |
Summary
Mocking \ReflectionClass throws an error in PHPUnit 8.5 when run with PHP>=8.1.
Current behavior
Throws an exception: Call to undefined method ReflectionUnionType::getName().
How to reproduce
// Execute with PHP>=8.1
$this->createMock(\ReflectionClass::class);Expected behavior
Works like in PHPUnit 9.3.
Metadata
Metadata
Assignees
Labels
feature/test-doublesTest Stubs and Mock ObjectsTest Stubs and Mock Objectstype/change-in-php-requires-adaptationA change in PHP requires a change so that existing PHPUnit functionality continues to workA change in PHP requires a change so that existing PHPUnit functionality continues to work