All Versions
16
Latest Version
Avg Release Cycle
137 days
Latest Release
9 days ago

Changelog History
Page 1

  • v0.1.3

    January 13, 2020

    BC-breaking changes :

    • Minimal version is 5.5.0.

    Format specific:

    • zip : Fixed PclZip-interface
    • 7zip : Fixed 7z-archiving, when archiving files should be renamed in archive
    • lzw : Fixed check for availability (#15)

    🆕 New features:

    • ➕ Added canCreateType(): bool
    • ➕ Added canAddFiles(): bool
    • ➕ Added canDeleteFiles(): bool
  • v0.1.2

    January 03, 2019

    BC-breaking changes :

    • PclZip-interface getter renamed to getPclZipInterface().
    • ➕ Make addFiles() return number of added files instead of total files number.

    Other changes:

    • 👻 Make addFiles() / deleteFiles() / archiveFiles() throw \Exceptions when any error occurred (and even when files list is empty).
    • 🛠 Fixed usage of / always as directory separator in addFiles() and archiveFiles().

    Format-specific changes:

    • Divided format-specific code into separate components.
    • zip :
      • Excluded directories from files list (getFileNames()).
      • Fixed retrieving new list of files after addFiles() usage.
      • (#11) Fixed invalid "/" archive entry after archiveFiles() usage.
    • tar (TarArchive adapter):
      • Fixed number of added files of addFiles().
      • Fixed list of files after deleteFiles() usage.
      • Added checks for compressed tar's support in canOpenArchive() and canOpenType().
    • tar (PharData adapter):
      • Fixed list of files after addFiles()/deleteFiles() usage and path generation of archive in archiveFiles().
      • Fixed path of files in getFileNames() to use UNIX path separator ("/").
    • iso :
      • Excluded directories from files list (getFileNames()).
    • 7zip :
      • Fixed result of deleteFiles() and archiveFiles() in-archive paths.
      • Fixed calculation of compressed file size in getFileData().
      • (#10) Set infinite timeout of 7z system call (useful for big archives).
    • cab :
      • Fixed extractFiles() functionality.
  • v0.1.1

    September 21, 2018

    API changes:

    • 🔄 Changed algorithm of files list generation in archiveFiles() and addFiles(): php // 1. one file $archive->archiveFiles('/var/www/site/abc.log', 'archive.zip'); // => stored as 'abc.log' // 2. directory $archive->archiveFiles('/var/www/site/runtime/logs', 'archive.zip'); // => directory content stored in archive root // 3. list $archive->archiveFiles([ '/var/www/site/abc.log' => 'abc.log', // stored as 'abc.log' '/var/www/site/abc.log', // stored as '/var/www/site/abc.log' '/var/www/site/runtime/logs' => 'logs', // directory content stored in 'logs' dir '/var/www/site/runtime/logs', // stored as '/var/www/site/runtime/logs' ], 'archive.zip');
    • 0️⃣ Disabled paths expanding in extractFiles() and deleteFiles() by default.

      If you need to expand src/ path to all files within this directory in archive, set second argument $expandFilesList argument to true.

      $archive->extractFiles(__DIR__, 'src/', true);
      $archive->deleteFiles('tests/', true);
      
    • ➕ Added new element in archiveFiles() result in emulation mode. Now it returns an archive with 4 elements: new type element with archive type.

    🛠 Fixes:

    • Fixed LZW-stream (.tar.Z) wrapper (before it didn't work).
    • Fixed ISO archives reading (before archive size could be calculated wrong).
    • Fixed CAB archives extraction in getFileContent($file) (before it didn't work).
    • Improved extraction in getFileContent($file) for RAR archives by using streams (before it did extract file in temporarily folder, read it and then delete it).

    👌 Improvements:

    • ➕ Added isFileExists($file): bool method for checking if archive has a file with specific name.
    • ➕ Added getFileResource($file): resource method for getting a file descriptor for reading all file content without full extraction in memory.
    • ➕ Added canOpenArchive($archiveFileName): bool and canOpenType($archiveFormat): bool static methods to check if specific archive or format can be opened.
    • ➕ Added detectArchiveType($fileName): string|false static method to detect (by filename or content) archive type.
    • ➕ Added addFile($file, $inArchiveName = null) / addDirectory($directory, $inArchivePath = null) to add one file or one directory, archiveFile($file, $archiveName) / archiveDirectory($directory, $archiveName) to archive one file or directory.

    Miscellaneous:

    • ➕ Added simple tests.
    • ➕ Added phar distribution.
  • v0.1.0

    April 11, 2018

    BC notes:

    • 🗄 UnifiedArchive::extractNode() renamed → extractFiles(). Original method is still available with @deprecated status.
    • 🗄 UnifiedArchive::archiveNodes() renamed → archiveFiles(). Original method is still available with @deprecated status.
    • 🗄 UnifiedArchive::getFileData() now returns ArchiveEntry instead of stdClass. Original object fields are still available with @deprecated status.

    Main changes:

    ➕ Added checks of archive opening status in UnifiedArchive constructor: now an Exception is throwing if archive is not readable.

    addFiles() and deleteFiles() now return false when archive is not editable.

    Some changes in archiveNodes() about handling directory names.

    🛠 Fixed archive rescan in addFiles() and deleteFiles().

    ✂ Removed example scripts (examples/).

    Code changes: added comments.

  • v0.1.0-alpha

    March 25, 2018

    BC notes:

    • 🗄 UnifiedArchive::extractNode() renamed → extractFiles(). Original method is still available with @deprecated status.
    • 🗄 UnifiedArchive::archiveNodes() renamed → archiveFiles(). Original method is still available with @deprecated status.
    • 🗄 UnifiedArchive::getFileData() now returns ArchiveEntry instead of stdClass. Original object fields are still available with @deprecated status.

    Main changes:

    ➕ Added checks of archive opening status in UnifiedArchive constructor: now an Exception is throwing if archive is not readable.

    addFiles() and deleteFiles() now return false when archive is not editable.

    Some changes in archiveNodes() about handling directory names.

    🛠 Fixed archive rescan in addFiles() and deleteFiles().

    ✂ Removed example scripts (examples/).

    Code changes: added comments,

  • v0.0.11

    March 21, 2018
    • Cleaned up some old code.
    • Added ext-phar adapter for .tar archives (if pear/archive_tar is not installed).
  • v0.0.10

    August 07, 2017
    • ✂ Remove docopt from requirements. Now it's a suggestion.
  • v0.0.9

    July 20, 2017

    📦 CAM merged into UnifiedArchive and now can be used without other packages: bin/cam.

  • v0.0.8

    January 24, 2017
    • ➕ Added initial support for CAB archives without extracting.
    • ➕ Added handling of short names of tar archives (.tgz/.tbz2/...).
    • ✂ Removed external repository declaration.
    • ✂ Removed die() in source code.
  • v0.0.7

    January 14, 2017

    🛠 Fixed:

    • Using ereg function on PHP >7.