Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292633

rename locale batch operation callbacks to match the API methods they call

$
0
0

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


Viewing all articles
Browse latest Browse all 292633

Trending Articles