Skip to content

1.1.6: Driver abilities + informative commands + NelexaZip driver

Choose a tag to compare

@wapmorgan wapmorgan released this 30 Jul 22:39
· 55 commits to master since this release

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).

  • open throws an Exception when format is not recognized or there's no driver that support requested abilities.

  • addFiles/deleteFiles/getComment/setComment throws 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 = []) (and cam files:test command) to test archive contents (compare actual control sum with stored crc32).
  • More informative output in commands: system:drivers, system:formats, system:format, added command files:test.
  • Added driver abilities to select better driver.

Driver changes:

  • Added NelexaZip pure-PHP driver.
  • Added Iso driver extraction ability.
  • Added commenting-ability for SevenZip driver (via descript.ion file in archive).