By claudiu.cristea on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.4.x
Introduced in version:
11.4.0
Issue links:
Description:
locale_translation_get_file_history()locale_translation_update_file_history()locale_translation_file_history_delete()
have been deprecated and replaced by a new CurrentImportStateStorage service.
There is a new CurrentImportState value object. This stores:
- project
- langcode
- version
- hash
- timestamp
- last_checked
- type
| Before | After |
|---|---|
locale_translation_get_file_history() |
No direct replacement, use \Drupal::service(CurrentImportStateStorage::class)->get($project, $langcode) This returns ?CurrentImportState |
locale_translation_update_file_history() |
\Drupal::service(CurrentImportStateStorage::class)->update() |
locale_translation_file_history_delete() |
\Drupal::service(CurrentImportStateStorage::class)->delete() |
drupal_static_reset('locale_translation_get_file_history') |
\Drupal::service('cache.memory')->invalidateTags(['locale_current_import']) |
New methods:
\Drupal::service(CurrentImportStateStorage::class)->updateLastChecked
\Drupal::service(CurrentImportStateStorage::class)->getOutdatedImports
Impacts:
Module developers
Site templates, recipes and distribution developers