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 getCMSValidator() method. #11539

Merged
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
6 changes: 6 additions & 0 deletions src/ORM/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -2706,6 +2706,12 @@ public function getCMSCompositeValidator(): CompositeValidator

// Support for the old method during the deprecation period
if ($this->hasMethod('getCMSValidator')) {
Deprecation::notice(
'5.4.0',
'The getCMSValidator() method is deprecated and won\'t be supported in a future major release.'
. ' Override getCMSCompositeValidator() instead.',
Deprecation::SCOPE_GLOBAL
Copy link
Member Author

Choose a reason for hiding this comment

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

Global scope because it's the only scope that won't include its own messaging. E.g. if we used method scope, the deprecation notice would say DataObject::getCMSCompositeValidator() is deprecated which is obviously not correct.

);
$compositeValidator->addValidator($this->getCMSValidator());
}

Expand Down
Loading