From 35e3eb9ce645a78a9dc93492077be62143fcc990 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Thu, 22 Aug 2024 12:30:09 +1200 Subject: [PATCH] API Deprecate extension to be replaced with config (#1243) --- src/Extensions/ElementalLeftAndMainExtension.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Extensions/ElementalLeftAndMainExtension.php b/src/Extensions/ElementalLeftAndMainExtension.php index 81d8ba0e..a98c6fa3 100644 --- a/src/Extensions/ElementalLeftAndMainExtension.php +++ b/src/Extensions/ElementalLeftAndMainExtension.php @@ -4,13 +4,23 @@ use SilverStripe\Admin\LeftAndMain; use SilverStripe\Core\Extension; +use SilverStripe\Dev\Deprecation; use SilverStripe\View\Requirements; /** * @extends Extension + * @deprecated 5.3.0 Will be replaced with YAML configuration */ class ElementalLeftAndMainExtension extends Extension { + public function __construct() + { + Deprecation::withNoReplacement( + fn () => Deprecation::notice('5.3.0', 'Will be replaced with YAML configuration', Deprecation::SCOPE_CLASS) + ); + parent::__construct(); + } + public function init() { Requirements::add_i18n_javascript('dnadesign/silverstripe-elemental:client/lang');