bug #38679 [PhpUnitBridge] Add missing exporter function for PHPUnit 7 (alcaeus)
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Add missing exporter function for PHPUnit 7
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License | MIT
This adds a missing `exporter` function to the compatibility trait for PHPUnit constraints. This method is still required for PhpUnit 7.
Commits
-------
52e7d78dca
Add missing exporter function for PHPUnit 7
This commit is contained in:
commit
e5faa29c5e
@ -11,6 +11,8 @@
|
||||
|
||||
namespace Symfony\Bridge\PhpUnit\Legacy;
|
||||
|
||||
use SebastianBergmann\Exporter\Exporter;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
@ -31,6 +33,15 @@ trait ConstraintTraitForV7
|
||||
return $this->doAdditionalFailureDescription($other);
|
||||
}
|
||||
|
||||
protected function exporter(): Exporter
|
||||
{
|
||||
if (null !== $this->exporter) {
|
||||
$this->exporter = new Exporter();
|
||||
}
|
||||
|
||||
return $this->exporter;
|
||||
}
|
||||
|
||||
protected function failureDescription($other): string
|
||||
{
|
||||
return $this->doFailureDescription($other);
|
||||
|
Reference in New Issue
Block a user