1.1.6: Driver abilities + informative commands + NelexaZip driver
BC-breaking changes:
-
Changed signature:
UnifiedArchive::open($filename, string|null $password = null)=>UnifiedArchive::open($filename, array $abilities = [], string|null $password = null). Right now if second argument is string, it will be treated as password (for BC-compatability). -
openthrows an Exception when format is not recognized or there's no driver that support requested abilities. -
addFiles/deleteFiles/getComment/setCommentthrows an Exception when driver does not support this ability. -
Deleted methods in UnifiedArchive:
canOpenArchive,canOpenType,canCreateType,getArchiveType,detectArchiveType,getFileResource,getArchiveFormat,isFileExists,getArchiveSize,countCompressedFilesSize,countUncompressedFilesSize.
New features:
- Added passing needed abilities to UnifiedArchive::open() to select a better driver:
use \wapmorgan\UnifiedArchive\Drivers\BasicDriver; # opens an array with driver, that supports content streaming and appending $archive = \wapmorgan\UnifiedArchive\UnifiedArchive::open('archive.7z', [BasicDriver::STREAM_CONTENT, BasicDriver::APPEND]); # if not specified, uses OPEN or OPEN_ENCRYPTED check, if password passed
- Added
UnifiedArchive::test($files = [])(andcam files:testcommand) to test archive contents (compare actual control sum with stored crc32). - More informative output in commands:
system:drivers,system:formats,system:format, added commandfiles:test. - Added driver abilities to select better driver.
Driver changes:
- Added
NelexaZippure-PHP driver. - Added
Isodriver extraction ability. - Added commenting-ability for
SevenZipdriver (viadescript.ionfile in archive).