-
Notifications
You must be signed in to change notification settings - Fork 333
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 API that's being removed in CMS 6 #3036
API Deprecate API that's being removed in CMS 6 #3036
Conversation
*/ | ||
public function PageListSidebar() | ||
{ | ||
Deprecation::noticeWithNoReplacment('5.4.0'); | ||
return $this->renderWith($this->getTemplatesWithSuffix('_PageList_Sidebar')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a template that redirects to a different template. Completely pointless.
* @deprecated 5.4.0 Will be renamed to RecordList | ||
*/ | ||
public function PageList() | ||
{ | ||
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to RecordList'); | ||
return $this->renderWith($this->getTemplatesWithSuffix('_PageList')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note I didn't add an implementation for RecordList()
because that will be using a renamed template, so people would update their calls to the method but not the template in 5 and then still have to make an update in 6 anyway.
It's extremely unlikely anyone will be calling this anyway so kinda moot.
code/Model/SiteTree.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note there's some API being removed from SiteTree
in CMS 6 but doesn't need deprecating because it's moved to the Hierarchy
extension in framework, which SiteTree
needs in order to function at all - so those methods will still be callable and overridable in subclasses anyway.
public function currentRecordID(): ?int | ||
{ | ||
$id = parent::currentRecordID(); | ||
$this->extend('updateCurrentPageID', $id); | ||
return $id; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mirrors currentPageID
above, but uses the same extension hook.
The CMS 6 PR will update the hook name and move it to LeftAndMain::currentRecordID()
directly instead.
/** | ||
* @deprecated 5.4.0 Will be renamed to getRecordClasses() | ||
*/ | ||
public function getPageClasses($page) | ||
{ | ||
Deprecation::noticeWithNoReplacment('5.4.0', 'Will be renamed to getRecordClasses()'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't add the new implementations of these two methods because they're defined by the interface.
92888ca
to
2767fe7
Compare
2767fe7
to
fd919b2
Compare
Issue
SiteTree
inCMSMain
#2947