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 Remove deprecated extension hooks #1880

Merged

Conversation

GuySartorelli
Copy link
Member

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.
@GuySartorelli GuySartorelli force-pushed the pulls/3.0/remove-deprecated branch from 7a30660 to e485142 Compare January 6, 2025 21:35
@@ -45,7 +45,6 @@
use SilverStripe\Model\ArrayData;
use SilverStripe\View\Requirements;
use SilverStripe\View\SSViewer;
use SilverStripe\Dev\Deprecation;
Copy link
Member Author

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;
Copy link
Member Author

Choose a reason for hiding this comment

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

Unused

Comment on lines -324 to -335
// 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);
}
]));
Copy link
Member Author

@GuySartorelli GuySartorelli Jan 6, 2025

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:

  1. update the component from their own subclass of ModelAdmin
  2. 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.

@emteknetnz emteknetnz merged commit 3ab0255 into silverstripe:3.0 Jan 7, 2025
15 checks passed
@emteknetnz emteknetnz deleted the pulls/3.0/remove-deprecated branch January 7, 2025 04:13
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