Issue #3163123 by Spokje, anmolgoyal74, andypost, guilhermevp, Niklan, Hardik_Patel_12, quietone, larowlan: Error: Class 'ZipArchive' not found in Drupal\Core\Archiver\Zip->__construct() (line 30 of core/lib/Drupal/Core/Archiver/Zip.php)

merge-requests/2103/merge
Dave Long 2022-11-17 17:31:37 +00:00
parent f745cf0cc9
commit c9c2ee18a2
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
3 changed files with 17 additions and 1 deletions

5
composer.lock generated
View File

@ -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": {

View File

@ -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": {

View File

@ -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']);
}
}