Skip to content

Commit

Permalink
bug #35787 [PhpUnitBridge] Use trait instead of extending deprecated …
Browse files Browse the repository at this point in the history
…class (marcello-moenkemeyer)

This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Use trait instead of extending deprecated class

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #32086
| License       | MIT
| Doc PR        |

Use `TestListenerDefaultImplementation` instead of deprecated `BaseTestListener` for `CoverageListenerForV6`

As this is my very first pull request for this project, I'd be very glad for hints and suggestions in case I missed something.

Commits
-------

034e1de [PhpUnitBridge] Use trait instead of extending deprecated class
  • Loading branch information
fabpot committed Feb 21, 2020
2 parents 7b1e4ea + 034e1de commit 8197d9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerForV6.php
Expand Up @@ -11,8 +11,9 @@

namespace Symfony\Bridge\PhpUnit\Legacy;

use PHPUnit\Framework\BaseTestListener;
use PHPUnit\Framework\Test;
use PHPUnit\Framework\TestListener;
use PHPUnit\Framework\TestListenerDefaultImplementation;

/**
* CoverageListener adds `@covers <className>` on each test when possible to
Expand All @@ -22,8 +23,10 @@
*
* @internal
*/
class CoverageListenerForV6 extends BaseTestListener
class CoverageListenerForV6 implements TestListener
{
use TestListenerDefaultImplementation;

private $trait;

public function __construct(callable $sutFqcnResolver = null, $warningOnSutNotFound = false)
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/PhpUnit/composer.json
Expand Up @@ -24,7 +24,7 @@
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
},
"conflict": {
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0"
},
"autoload": {
"files": [ "bootstrap.php" ],
Expand Down

0 comments on commit 8197d9a

Please sign in to comment.