-
-
Notifications
You must be signed in to change notification settings - Fork 826
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
CRM_Utils_String - Fix convertStringToSnakeCase to prevent double underscores #32075
Conversation
…erscores And add a bunch of unit tests.
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
Beautiful tests. :) In terms of the function itself, it sounds pretty sensible. (I don't know the situation that's motivating, but it seems fair on its own.) In terms of downstream effects, I tried grepping core for usages. Many callers look OK (e.g. they have narrow input domains or ephemeral usages). The question for consideration would be places where (1) the input-domain is wide and/or (2) the runtime-computed Two that came up as possible concerns:
However, @colemanw, you probably know the dataflows around those two better than me. I'll defer to you on how much change-management is necessary (e.g. none vs upgrade-warning vs upgrade-cleanup). |
…ing::convertStringToSnakeCase This string function gives slightly different output than it used to, so update any stored strings accordingly Also added handling for custom field group tab names in afform_civicrm_tabset().
bc235b4
to
681c9c6
Compare
One of the first times I've used the AI assistant and it actually did something helpful. 2 out of the 3 tests it wrote passed without any tweaking. Good catch grepping around, I think that:
|
So... I can't really confirm if there's a problem being fixed. But, on the plus side, those things still seemed to work the same after the patch... |
Overview
Fixes a quirk in a string converter function, and adds a bunch of unit tests.