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 d1f3d63
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion 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 @@ -12,11 +13,20 @@
* @author Russell Michell [email protected]
* @package advancedworkflow
*/
class AWRequiredFields extends RequiredFields
class AWRequiredFieldsValidator extends RequiredFields
{
protected $data = array();
protected static $caller;

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

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

0 comments on commit d1f3d63

Please sign in to comment.