From bcdf13764b9d2edddd90affa4ed7f2efd76682c5 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 3 Dec 2024 18:33:17 +1300 Subject: [PATCH] API Deprecate renamed validator --- code/Form/UserFormsRequiredFields.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/Form/UserFormsRequiredFields.php b/code/Form/UserFormsRequiredFields.php index 0d7c4b38f..43b1fcf91 100644 --- a/code/Form/UserFormsRequiredFields.php +++ b/code/Form/UserFormsRequiredFields.php @@ -9,6 +9,7 @@ use SilverStripe\Forms\RequiredFields; use SilverStripe\ORM\ArrayLib; use SilverStripe\UserForms\Model\EditableFormField; +use SilverStripe\Dev\Deprecation; /** * An extension of RequiredFields which handles conditionally required fields. @@ -22,6 +23,15 @@ */ class UserFormsRequiredFields extends RequiredFields { + /** + * @deprecated 5.4.0 Will be renamed to SilverStripe\UserForms\Form\\UserFormsRequiredFieldsValidator + */ + public function __construct() + { + Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to SilverStripe\\UserForms\\Form\\\UserFormsRequiredFieldsValidator', Deprecation::SCOPE_CLASS); + parent::__construct(...func_get_args()); + } + /** * Allows validation of fields via specification of a php function for * validation which is executed after the form is submitted.