From 239873baa0805324dadac7dba00f22ea0976216f Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 12 Sep 2024 17:44:41 +1200 Subject: [PATCH] API Deprecate SSListExporter --- src/Dev/SSListExporter.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Dev/SSListExporter.php b/src/Dev/SSListExporter.php index 96293162f..3ae352b78 100644 --- a/src/Dev/SSListExporter.php +++ b/src/Dev/SSListExporter.php @@ -6,6 +6,7 @@ use SebastianBergmann\Exporter\Exporter; use SebastianBergmann\RecursionContext\Context; use SilverStripe\ORM\SS_List; use SilverStripe\View\ViewableData; +use SilverStripe\Dev\Deprecation; if (!class_exists(Exporter::class)) { return; @@ -13,9 +14,22 @@ if (!class_exists(Exporter::class)) { /** * A custom exporter for prettier formatting of SilverStripe specific Objects in PHPUnit's failing test messages. + * + * @deprecated 5.4.0 Will be removed without equivalent functionality to replace it */ class SSListExporter extends Exporter implements TestOnly { + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice( + '5.4.0', + 'Will be removed without equivalent functionality to replace it', + Deprecation::SCOPE_CLASS + ); + }); + } + /** * @param mixed $value * @param int $indentation