Skip to content

Commit

Permalink
API Deprecate FormField API
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 14, 2024
1 parent 1f2ae2a commit 936ffe2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Forms/DateField.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class DateField extends TextField
* to detect invalid values.
*
* @var mixed
* @deprecated 5.4.0 Use $value instead
*/
protected $rawValue = null;

Expand Down
1 change: 1 addition & 0 deletions src/Forms/DatetimeField.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class DatetimeField extends TextField
* to detect invalid values.
*
* @var mixed
* @deprecated 5.4.0 Will be removed without equivalent functionality to replace it
*/
protected $rawValue = null;

Expand Down
3 changes: 3 additions & 0 deletions src/Forms/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use SilverStripe\View\AttributesHTML;
use SilverStripe\View\SSViewer;
use SilverStripe\View\ViewableData;
use SilverStripe\Dev\Deprecation;

/**
* Represents a field in a form.
Expand Down Expand Up @@ -1223,9 +1224,11 @@ public function Type()
* @param bool $result
* @param Validator $validator
* @return bool
* @deprecated 5.4.0 Use extend() directly instead
*/
protected function extendValidationResult(bool $result, Validator $validator): bool
{
Deprecation::notice('5.4.0', 'Use extend() directly instead');
$this->extend('updateValidationResult', $result, $validator);
return $result;
}
Expand Down
1 change: 1 addition & 0 deletions src/Forms/TimeField.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class TimeField extends TextField
* to detect invalid values.
*
* @var mixed
* @deprecated 5.4.0 Will be removed without equivalent functionality to replace it
*/
protected $rawValue = null;

Expand Down

0 comments on commit 936ffe2

Please sign in to comment.