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

ENH Align ArrayList case sensitivity with other lists #11529

Conversation

GuySartorelli
Copy link
Member

SearchFilter defaults to getting its case sensitivity from the database collation settings - this is true even when the list being used is ArrayList. ArrayList used to then override that default with its own default, but that was only to preserve BC.

This change now aligns the default case sensitivity of ArrayList with other lists that use SearchFilter for their filtering functionality which provides a more consistent and predictable behaviour - calling filter() on a list which uses SearchFilter will now always have the same case sensitivity if no modifier is explicitly used.

Issue

* Whether filter and exclude calls should be case sensitive by default or not.
* This configuration property is here for backwards compatability.
*
* @deprecated 5.1.0 use SearchFilter.default_case_sensitive instead
Copy link
Member

Choose a reason for hiding this comment

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

So, is ArrayList going to use SearchFilter.default_case_sensitive ? Quick skim of the diff I cannot see it being referenced, though I may have simply missed it

Copy link
Member Author

@GuySartorelli GuySartorelli Jan 7, 2025

Choose a reason for hiding this comment

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

ArrayList uses search filters. The search filters do use SearchFilter.default_case_sensitive.

As mentioned in the PR description, ArrayList used to override the searchfilter default. This change removes that override.

@emteknetnz emteknetnz merged commit bf05e17 into silverstripe:6.0 Jan 7, 2025
13 checks passed
@emteknetnz emteknetnz deleted the pulls/6.0/arraylist-case-sensitivity branch January 7, 2025 23:38
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