Skip to content

1.1.0: New formats and restructuration

Choose a tag to compare

@wapmorgan wapmorgan released this 13 Feb 00:11
· 175 commits to master since this release
41339ef

New features:

  • Added ability to open archives encrypted with password - added $password argument to UnifiedArchive::open($fileName, $password = null). Works only with: zip, rar, 7z.
  • Added ability to adjust compression level for new archives - added $compressionLevel argument (with default BasicDriver::COMPRESSION_AVERAGE level) to:
    • UnifiedArchive->archiveFiles($fileOrFiles, $archiveName, $compressionLevel = BasicDriver::COMPRESSION_AVERAGE)
    • UnifiedArchive->archiveFile($file, $archiveName, $compressionLevel = BasicDriver::COMPRESSION_AVERAGE)
    • UnifiedArchive->archiveDirectory($file, $archiveName, $compressionLevel = BasicDriver::COMPRESSION_AVERAGE)
      Works only with: zip, gzip.
  • Added ability to append the archive with a file from string - added addFileFromString method:
    UnifiedArchive->addFileFromString(string $inArchiveName, string $content).
  • Added tests for format support:
    • Formats::canOpen()
    • Formats::canCreate()
    • Formats::canAppend() - check if file can be added to an archive
    • Formats::canUpdate() - check if archive member can be removed
    • Formats::canEncrypt() - check if encrypted archive can be opened

Format changes:

  • Extended SevenZip driver: now it supports a lot of formats (7z, zip, rar, iso, tar and so on).
  • Added AlchemyZippy driver: it works via command-line programs for zip, tar, tar.gz and tar.bz2.

Methods renamed:

  • UnifiedArchive::canOpenType -> Formats::canOpen
  • UnifiedArchive::canOpenArchive -> UnifiedArchive::canOpen
  • UnifiedArchive::canCreateType -> Formats::canCreate
  • UnifiedArchive->getArchiveType -> UnifiedArchive->getArchiveFormat

Old methods exist, but marked as deprecated.