Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e5faa29

Browse files
committed
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 ------- 52e7d78 Add missing exporter function for PHPUnit 7
2 parents 5a4be68 + 52e7d78 commit e5faa29

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Bridge\PhpUnit\Legacy;
1313

14+
use SebastianBergmann\Exporter\Exporter;
15+
1416
/**
1517
* @internal
1618
*/
@@ -31,6 +33,15 @@ protected function additionalFailureDescription($other): string
3133
return $this->doAdditionalFailureDescription($other);
3234
}
3335

36+
protected function exporter(): Exporter
37+
{
38+
if (null !== $this->exporter) {
39+
$this->exporter = new Exporter();
40+
}
41+
42+
return $this->exporter;
43+
}
44+
3445
protected function failureDescription($other): string
3546
{
3647
return $this->doFailureDescription($other);

0 commit comments

Comments
 (0)