Changelog History
Page 1
-
v1.0.1 Changes
November 28, 2020- ๐ Improved extendable for all classes - used late-static binding everywhere.
Format specific:
- gzip : improved detection of archive by content.
-
v1.0.0 Changes
June 13, 2020That's first production-ready release!
Format specific:
- tar :
- Fixed automatic opening of .tar.Z and .tar.xz.
- rar :
- Exclude directories from files list.
- tar :
-
v0.2.0 Changes
February 02, 2020BC-breaking changes:
- โ Deleted deprecated UnifiedArchive methods:
extractNode
,archiveNodes
. - ๐ Functionality of preparing files list for archiving is moved from
archiveFiles()
toprepareForArchiving()
. - All mutable methods throws exceptions on errors now:
getFileData
,getFileContent
,getFileResource
throwsNonExistentArchiveFileException
when file is not present in archive.extractFiles
throws:EmptyFileListException
ArchiveExtractionException
deleteFiles
,addFiles
,addFile
andaddDirectory
throws:EmptyFileListException
UnsupportedOperationException
ArchiveModificationException
-
archiveFiles
,archiveFile
andarchiveDirectory
throws:FileAlreadyExistsException
EmptyFileListException
UnsupportedOperationException
ArchiveCreationException
- โ Deleted deprecated UnifiedArchive methods:
-
v0.1.3 Changes
January 13, 2020BC-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 Changes
January 03, 2019BC-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\Exception
s when any error occurred (and even when files list is empty). - ๐ Fixed usage of
/
always as directory separator inaddFiles()
andarchiveFiles()
.
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.
- Excluded directories from files list (
- 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()
andcanOpenType()
.
- Fixed number of added files of
- tar (
PharData
adapter):- Fixed list of files after
addFiles()
/deleteFiles()
usage and path generation of archive inarchiveFiles()
. - Fixed path of files in
getFileNames()
to use UNIX path separator ("/").
- Fixed list of files after
- iso :
- Excluded directories from files list (
getFileNames()
).
- Excluded directories from files list (
- 7zip :
- Fixed result of
deleteFiles()
andarchiveFiles()
in-archive paths. - Fixed calculation of compressed file size in
getFileData()
. - (#10) Set infinite timeout of
7z
system call (useful for big archives).
- Fixed result of
- cab :
- Fixed
extractFiles()
functionality.
- Fixed
- PclZip-interface getter renamed to
-
v0.1.1 Changes
September 21, 2018API changes:
- ๐ Changed algorithm of files list generation in
archiveFiles()
andaddFiles()
: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()
anddeleteFiles()
by default.If you need to expand
src/
path to all files within this directory in archive, set second argument$expandFilesList
argument totrue
.$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: newtype
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
andcanOpenType($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.
- ๐ Changed algorithm of files list generation in
-
v0.1.0 Changes
April 11, 2018BC 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 returnsArchiveEntry
instead ofstdClass
. 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()
anddeleteFiles()
now return false when archive is not editable.Some changes in
archiveNodes()
about handling directory names.๐ Fixed archive rescan in
addFiles()
anddeleteFiles()
.โ Removed example scripts (
examples/
).Code changes: added comments.
- ๐
-
v0.1.0-alpha Changes
March 25, 2018BC 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 returnsArchiveEntry
instead ofstdClass
. 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()
anddeleteFiles()
now return false when archive is not editable.Some changes in
archiveNodes()
about handling directory names.๐ Fixed archive rescan in
addFiles()
anddeleteFiles()
.โ Removed example scripts (
examples/
).Code changes: added comments,
- ๐
-
v0.0.11 Changes
March 21, 2018- Cleaned up some old code.
- Added
ext-phar
adapter for .tar archives (ifpear/archive_tar
is not installed).
-
v0.0.10 Changes
August 07, 2017- โ Remove
docopt
from requirements. Now it's a suggestion.
- โ Remove