Skip to content

[PhpUnitBridge] CoverageListenerTrait is incompatible with PHPUnit 8.5 #37637

Closed
@derrabus

Description

@derrabus

Symfony version(s) affected: 3.4

Description

When running the testsuite of PhpUnitBridge with PHPUnit 8.5, it fails with the following exception:

ReflectionException: Property PHPUnit\Util\Test::$annotationCache does not exist in /path/to/symfony/src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerTrait.php:73

How to reproduce

Run the test suite of Symfony's 3.4 branch with PHPUnit 8.5.

Additional context

Apparently, PhpUnitBridge tries to fiddle with a private property PHPUnit\Util\Test::$annotationCache.

$r = new \ReflectionProperty($testClass, 'annotationCache');

That property has been removed in PHPUnit 8.4 and replaced by a new class PHPUnit\Util\Annotation\Registry.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions