diff --git a/src/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php b/src/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php index a70dbd165a2..12acdc6dc40 100644 --- a/src/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php +++ b/src/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php @@ -14,6 +14,7 @@ namespace ApiPlatform\Symfony\Bundle\Test\Constraint; use SebastianBergmann\Comparator\ComparisonFailure; +use SebastianBergmann\Exporter\Exporter; /** * Constraint that asserts that the array it is evaluated for has a specified subset. @@ -67,7 +68,7 @@ private function _evaluate($other, string $description = '', bool $returnResult */ public function toString(): string { - return 'has the subset '.$this->exporter()->export($this->subset); + return 'has the subset '.(new Exporter())->export($this->subset); } /**