diff --git a/src/Composer/Package/Archiver/ZipArchiver.php b/src/Composer/Package/Archiver/ZipArchiver.php index ec241a026..c0ce41d65 100644 --- a/src/Composer/Package/Archiver/ZipArchiver.php +++ b/src/Composer/Package/Archiver/ZipArchiver.php @@ -51,8 +51,9 @@ class ZipArchiver implements ArchiverInterface /** * ZipArchive::setExternalAttributesName is available from >= PHP 5.6 + * setExternalAttributesName() is only available with libzip 0.11.2 or above */ - if (PHP_VERSION_ID >= 50600) { + if (PHP_VERSION_ID >= 50600 && method_exists($zip, 'setExternalAttributesName')) { $perms = fileperms($filepath); /**