By claudiu.cristea on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.8.x
Introduced in version:
8.8.0-alpha1
Issue links:
Description:
Procedural functions archiver_get_extensions() and archiver_get_archiver() are deprecated. Instead, the plugin.manager.archiver exposed two news methods ::getExtensions() and ::getInstance() respectively.
Before:
$extensions = archiver_get_extensions();
$archiver = archiver_get_archiver($file);
After:
$extensions = \Drupal::service('plugin.manager.archiver')->getExtensions();
$archiver = \Drupal::service('plugin.manager.archiver')->getInstance([
// Archiver objects require a real path to a local file, not a file stream.
'filepath' => \Drupal::service('file_system')->realpath($file),
]);
Impacts:
Module developers