Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Deprecate FormField API #11464

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 Use $value instead
*/
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 Use $value instead
*/
protected $rawValue = null;

Expand Down