Skip to content

Commit

Permalink
API Deprecate renamed validator
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 3, 2024
1 parent 47af9f5 commit d7abf47
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Forms/AWRequiredFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Symbiote\AdvancedWorkflow\Forms;

use SilverStripe\Forms\RequiredFields;
use SilverStripe\Dev\Deprecation;

/**
* Extends RequiredFields so we can prevent DO writes in AW's controller(s) without needing to catch Exceptions
Expand All @@ -17,6 +18,16 @@ class AWRequiredFields extends RequiredFields
protected $data = array();
protected static $caller;

/**
* @deprecated 5.4.0 Will be renamed to Symbiote\AdvancedWorkflow\Forms\AWRequiredFieldsValidator
*/
public function __construct()
{
$message = 'Will be renamed to Symbiote\\AdvancedWorkflow\\Forms\\AWRequiredFieldsValidator';
Deprecation::noticeWithNoReplacment('5.4.0', $message, Deprecation::SCOPE_CLASS);
parent::__construct(...func_get_args());
}

public function php($data)
{
$valid = parent::php($data);
Expand Down

0 comments on commit d7abf47

Please sign in to comment.