-
Notifications
You must be signed in to change notification settings - Fork 96
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 Remove deprecated extension hooks #1880
API Remove deprecated extension hooks #1880
Conversation
We don't really have a way to deprecate these per-se, but they were removed in other admin sections already so it's time to remove them from here as well.
7a30660
to
e485142
Compare
@@ -45,7 +45,6 @@ | |||
use SilverStripe\Model\ArrayData; | |||
use SilverStripe\View\Requirements; | |||
use SilverStripe\View\SSViewer; | |||
use SilverStripe\Dev\Deprecation; |
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.
Unused
@@ -10,7 +10,6 @@ | |||
use SilverStripe\Control\HTTPResponse; | |||
use SilverStripe\Core\Injector\Injector; | |||
use SilverStripe\Forms\Form; | |||
use SilverStripe\Dev\Deprecation; |
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.
Unused
// Remove default and add our own filter header with extension points | ||
// to retain API until deprecation in 5.0 | ||
$config->removeComponentsByType(GridFieldFilterHeader::class); | ||
$config->addComponent(Injector::inst()->createWithArgs(GridFieldFilterHeader::class, [ | ||
false, | ||
function ($context) { | ||
$this->extend('updateSearchContext', $context); | ||
}, | ||
function ($form) { | ||
$this->extend('updateSearchForm', $form); | ||
} | ||
])); |
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.
We don't really have a way to deprecate these per-se, but they were removed in other admin sections already so it seems sensible to remove them from here as well.
This code was added in #665 which moved the search context from ModelAdmin
into GridFieldFilterHeader
- it seems clear the intention was to completely shift responsibility of managing it out of the controller and into the gridfield coponent.
Developers who need to update these can either:
- update the component from their own subclass of
ModelAdmin
- update the search context in their
DataObject
subclass
EDIT:
These don't work anyway lol. The code for them was deprecated in CMS 4 and then subsequently removed in CMS 5.
Issue