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

DOC Add validations related to DBField #603

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Oct 20, 2024

Issue silverstripe/silverstripe-framework#11403

Linting issue is existing

@@ -102,6 +102,8 @@ SilverStripe\ORM\FieldType\DBPolymorphicForeignKey:
- [`HTTPOutputHandler::isCli()`](api:SilverStripe\Logging\HTTPOutputHandler::isCli()) has been deprecated. Use [`Director::is_cli()`](api:SilverStripe\Control\Director::is_cli()) instead instead.
- [`PasswordValidator`](api:SilverStripe\Security\PasswordValidator) has been deprecated. It will be renamed to `SilverStripe\Security\Validation\RulesPasswordValidator`.
- [`ContentReviewEmails::isValidEmail()`](api:SilverStripe\ContentReview\Tasks\ContentReviewEmails::isValidEmail()) has been deprecated. Use [`Email::is_valid_address()`](api:SilverStripe\Control\Email\Email::is_valid_address()) instead.
- [`DBField.defaultVal`](api:SilverStripe\ORM\FieldType\DBField->defaultVal). Use getDefaultValue() and setDefaultValue() instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [`DBField.defaultVal`](api:SilverStripe\ORM\FieldType\DBField->defaultVal). Use getDefaultValue() and setDefaultValue() instead.
- The [`DBField.defaultVal`](api:SilverStripe\ORM\FieldType\DBField->defaultVal) property has been deprecated. Use getDefaultValue() and setDefaultValue() instead.

Also make getDefaultValue() and setDefaultValue() into links.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@@ -102,6 +102,8 @@ SilverStripe\ORM\FieldType\DBPolymorphicForeignKey:
- [`HTTPOutputHandler::isCli()`](api:SilverStripe\Logging\HTTPOutputHandler::isCli()) has been deprecated. Use [`Director::is_cli()`](api:SilverStripe\Control\Director::is_cli()) instead instead.
- [`PasswordValidator`](api:SilverStripe\Security\PasswordValidator) has been deprecated. It will be renamed to `SilverStripe\Security\Validation\RulesPasswordValidator`.
- [`ContentReviewEmails::isValidEmail()`](api:SilverStripe\ContentReview\Tasks\ContentReviewEmails::isValidEmail()) has been deprecated. Use [`Email::is_valid_address()`](api:SilverStripe\Control\Email\Email::is_valid_address()) instead.
- [`DBField.defaultVal`](api:SilverStripe\ORM\FieldType\DBField->defaultVal). Use getDefaultValue() and setDefaultValue() instead.
- [`DBFile::validate()`](api:SilverStripe\Assets\Storage\DBFile::validate()) has been deprecated. Use validateFilename() instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validateFilename() should be a link.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GuySartorelli GuySartorelli merged commit d70735f into silverstripe:5 Oct 21, 2024
2 of 3 checks passed
@GuySartorelli GuySartorelli deleted the pulls/5/api-depr branch October 21, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants