diff --git a/composer.lock b/composer.lock index 5c82830407a..87760bc0a5e 100644 --- a/composer.lock +++ b/composer.lock @@ -443,7 +443,7 @@ "dist": { "type": "path", "url": "core", - "reference": "03111049ab167a24a06da256ed9e8fbb44effcf2" + "reference": "5f2081f177087a7cb2c2a9adaa6ddb9321d36436" }, "require": { "asm89/stack-cors": "^2.1", @@ -515,6 +515,9 @@ "drupal/core-uuid": "self.version", "drupal/core-version": "self.version" }, + "suggest": { + "ext-zip": "Needed to extend the plugin.manager.archiver service capability with the handling of files in the ZIP format." + }, "type": "drupal-core", "extra": { "drupal-scaffold": { diff --git a/core/composer.json b/core/composer.json index 216275b34d2..c5d1718ddc8 100644 --- a/core/composer.json +++ b/core/composer.json @@ -110,6 +110,9 @@ "config": { "preferred-install": "dist" }, + "suggest": { + "ext-zip": "Needed to extend the plugin.manager.archiver service capability with the handling of files in the ZIP format." + }, "extra": { "drupal-scaffold": { "file-mapping": { diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 47b8324ce53..6cadc541b9a 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -1389,3 +1389,13 @@ function system_file_download($uri) { } } } + +/** + * Implements hook_archiver_info_alter(). + */ +function system_archiver_info_alter(&$info) { + if (!class_exists(\ZipArchive::class)) { + // PHP Zip extension is missing. + unset($info['Zip']); + } +}