From 45a02e02ff241a87ee56b6a94ccd3e2001bad22f Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Wed, 21 Aug 2024 12:15:38 +1200 Subject: [PATCH] API Deprecate extension to be replaced with config --- code/Controller/AssetAdminFieldsExtension.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/Controller/AssetAdminFieldsExtension.php b/code/Controller/AssetAdminFieldsExtension.php index 9b4ebe261..fe50e8cea 100644 --- a/code/Controller/AssetAdminFieldsExtension.php +++ b/code/Controller/AssetAdminFieldsExtension.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 AssetAdminFieldsExtension 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('silverstripe/asset-admin:client/lang', false);