From 52e7d78dcabdb3f4e5def5c5bc240fe8ded4b55f Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Thu, 22 Oct 2020 13:20:03 +0200 Subject: [PATCH] Add missing exporter function for PHPUnit 7 --- .../Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php index 48c79a76dd0cf..9877049153d00 100644 --- a/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php +++ b/src/Symfony/Bridge/PhpUnit/Legacy/ConstraintTraitForV7.php @@ -11,6 +11,8 @@ namespace Symfony\Bridge\PhpUnit\Legacy; +use SebastianBergmann\Exporter\Exporter; + /** * @internal */ @@ -31,6 +33,15 @@ protected function additionalFailureDescription($other): string 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);