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 renamed validator #1354

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz marked this pull request as ready for review December 3, 2024 05:27
public function __construct()
{
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to SilverStripe\\UserForms\\Form\\\UserFormsRequiredFieldsValidator', Deprecation::SCOPE_CLASS);
parent::__construct(...func_get_args());
Copy link
Member Author

Choose a reason for hiding this comment

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

@emteknetnz emteknetnz marked this pull request as draft December 3, 2024 05:55
@emteknetnz emteknetnz marked this pull request as ready for review December 4, 2024 22:06
@@ -19,9 +20,17 @@
*
* Required fields will be validated as usual.
* Conditionally required fields will be validated IF the display rules are satisfied in the submitted dataset.
*
* @deprecated 5.4.0 Will be renamed to SilverStripe\UserForms\Form\\UserFormsRequiredFieldsValidator
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
* @deprecated 5.4.0 Will be renamed to SilverStripe\UserForms\Form\\UserFormsRequiredFieldsValidator
* @deprecated 5.4.0 Will be renamed to SilverStripe\UserForms\Form\UserFormsRequiredFieldsValidator

Copy link
Member

Choose a reason for hiding this comment

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

If the namespace isn't changing, we can probably just keep the class name? I can't think of another class we've only changed the name for and not the namespace though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Its easier to just have the FQCN. Makes it easier for things like automated tooling

code/Form/UserFormsRequiredFields.php Outdated Show resolved Hide resolved
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 6b28f3a into silverstripe:6 Dec 5, 2024
13 checks passed
@GuySartorelli GuySartorelli deleted the pulls/6/depr-valid branch December 5, 2024 21:44
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