Problem/Motivation
locale_config_batch_set_config_langcodes() and locale_config_batch_refresh_name() are batch operation callbacks which are just wrappers around API methods on the LocaleConfigManager.
However, the names don't match up at all which is confusing:
function locale_config_batch_set_config_langcodes(&$context) {
Locale::config()->updateDefaultConfigLangcodes();
and:
function locale_config_batch_refresh_name(array $names, array $langcodes, &$context) {
SNIP
$context['results']['stats']['config'] += Locale::config()->updateConfigTranslations($names, $langcodes);
Steps to reproduce
Proposed resolution
Rename both callbacks to 'locale_config_batch_' + snake case version of the API method it calls.
No BC handling is necessary as batch API callbacks are internal.
Remaining tasks
- Update the merge request to retain the procedural functions that wrap the new methods, and add a deprecation (see #5).
- Fix the coding standards error in the pipeline job (see #16).
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #4
joachim commentedThanks for the MR. Looks goo!
Comment #5
catchThese are procedural functions without a leading underscore, we should leave the old one as wrappers and deprecate them.
Comment #6
prabuela commentedComment #7
prabuela commentedComment #8
secretsayan commentedComment #10
anicotoComment #11
joachim commentedSomeone should rebase the branch before a novice works on it -- it looks like it's been merged rather than rebased, which is going to make the history messy.
Comment #12
traviscarden commentedActually, I think it just conflicts with #3422915: Deprecate Drupal\locale\Locale and its one method. I'll rebase it onto the commit right before that, but someone will need to advise on the new direction: Does the new scope become resolving the conflict? Or is this no longer a novice issue--or even obsolete?
Comment #13
smustgrave commentedMR currently have some phpcs errors.
Comment #14
xjmI agree with #11 and #12; this is not Novice for right now. Thanks!
Comment #15
joachim commentedRebased on 11.x and resolved the conflict.
This is good for novices again -- see #5 for what needs doing.
Comment #16
xjmAgreed, thanks @joachim!
There is also a coding standards issue to resolve:
Comment #17
secretsayan commentedComment #18
smustgrave commentedLeft some comments on the MR.
Comment #19
secretsayan commentedComment #20
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #21
secretsayan commentedMarking this again as Needs Review as PHPSTAN is already passing in the pipeline.
Comment #22
smustgrave commentedSo function renaming should have a change record and deprecations should point to that vs the ticket.
Thanks
Comment #23
joachim commentedThese are internal functions. They're batch API callbacks, they're not going to be used anywhere else.
Comment #24
smustgrave commentedPersonally still think a CR should be made so will leave for additional reviewers.
Comment #25
smustgrave commentedDeprecations will have to be updated for deprecated in 11 removed in 12.
Comment #27
nexusnovaz commentedUpdated deprecations to be 11.1.0. Could you please review MR !6742. Thanks!
Comment #28
smustgrave commentedThanks. I should of caught this before so my bad. But we will need a change record to announce the deprecation. And the links in the deprecation needs to be with that CR link.
CR can be pretty simple, would look through existing ones in the change records list.
Comment #29
nexusnovaz commentedHey, made the CR which can be found here: https://www.drupal.org/node/3475054. Also replaced the issue links in the MR with this link. Please can this be reviewed again.
Comment #30
smustgrave commentedThanks! Believe this one is good
Comment #31
traviscarden commentedComment #32
quietone commentedI read the issue summary, comments and the MR. Everything looks in order here. The deprecation messages in the docblocks don't need to list the function arguments but it is also not wrong. So, leaving that as is. And thanks for the nicely formatted change record, it is is easy to read.
I updated credit.
Leaving at RTBC.
Comment #33
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #34
sayan_k_dutta commentedWorking on it.
Comment #35
traviscarden commented@secretsayan asked me to push this change for him real quick because he's in the process of moving to a new laptop.
Comment #36
smustgrave commentedFailure seems unrelated, re-running. Resolved the threads while I was at it. Bot feedback appears addressed.
Comment #37
alexpottCommitted and pushed 6b6facdc29e to 11.x and 167dc216f33 to 11.1.x. Thanks!
Comment #38
alexpottComment #43
traviscarden commentedCongratulations on your first Core commit, @secretsayan! 😄
Comment #44
secretsayan commentedThanks @traviscarden :)
Comment #46
xjmAmending attribution.