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

Silence deprecation on search_fields within the blacklight code #2792

Merged

Conversation

hackartisan
Copy link
Contributor

This silences deprecation warnings downstream.
refs 009a426

@@ -67,6 +67,10 @@ json.included do
end
end

search_fields = blacklight_config.search_fields.values.
Copy link
Member

Choose a reason for hiding this comment

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

I think it's possible downstream applications have overridden the search_fields helper, so the best we can do is wrap it in Deprecation.silence(Blacklight::ConfigurationHelperBehavior)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! Wrap this bit of code then? I will try that.

@hackartisan hackartisan force-pushed the backport-search_fields-jbuilder branch from a4fae43 to c2d101c Compare July 25, 2022 18:58
This avoids deprecation warnings downstream while ensuring we preserve
overridden behavior until the deprecation goes into effect.

refs projectblacklight@009a426
@hackartisan hackartisan force-pushed the backport-search_fields-jbuilder branch from c2d101c to eaaf8c2 Compare July 25, 2022 19:46
@hackartisan hackartisan changed the title Backport search_fields definition to index.json.jbuilder Silence deprecation on search_fields within the blacklight code Jul 25, 2022
@hackartisan
Copy link
Contributor Author

@cbeer how's this? silences deprecations when I try it with my app.

@cbeer cbeer merged commit 70f89c0 into projectblacklight:release-7.x Jul 25, 2022
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.

None yet

2 participants