Commit Graph

854 Commits

Author SHA1 Message Date
Greg Beaver
b0f281b159 restore Phar->compress/decompress() to simplify $phar->convertToExecutable(NULL, Phar::GZ) to $phar->compress(Phar::GZ)
[DOC]
2008-04-11 13:41:59 +00:00
Greg Beaver
8f28d19d4e cosmetics, extra space 2008-04-11 13:26:36 +00:00
Greg Beaver
3493fb6561 combine PharFileInfo->setCompressedGZ/setCompressedBZIP2 into compress() with parameter Phar::GZ or Phar::BZ2
use ZEND_ACC_PUBLIC in PharFileInfo definitions, to be consistent
[DOC]
2008-04-11 13:26:03 +00:00
Greg Beaver
ab34fcac05 merge PharFileInfo->isCompressed/isCompressedGZ/isCompressedBZIP2 by adding an
optional parameter to isCompressed for testing specific compression algorithm
[DOC]
2008-04-11 13:07:14 +00:00
Greg Beaver
c07a07ea68 change PharFileInfo->setUncompressed to decompress
[DOC]
2008-04-11 12:56:53 +00:00
Greg Beaver
c0d82e966f refactor compress/convertToTar/convertToPhar/convertToZip/convertToExecutable/convertToData
into 2 methods:
convertToExecutable/convertToData.  Both methods accept 3 optional parameters
1 archive type, Phar::PHAR, Phar::TAR, or Phar::ZIP
2 compression Phar::NONE, Phar::GZ, or Phar::BZ2
3 file extension.  Default is <format>.<compression> where .phar.tar is executable .tar
convertToExecutable always returns a Phar object
convertToData always returns a PharData object
also added Phar::PHAR, Phar::TAR, and Phar::ZIP class constants
[DOC]
2008-04-11 04:20:15 +00:00
Greg Beaver
f0ff6fb109 s/getContents/getContent/ 2008-04-10 13:41:29 +00:00
Greg Beaver
61b5fc48e3 re-factor all-file compression. Remove compressAllFilesGZ/compressAllFilesBZ2 in favor of
unifying compressFiles which accepts Phar::GZ or Phar::BZ2 as argument.  rename uncompressAllFiles to decompressFiles
2008-04-10 13:40:26 +00:00
Greg Beaver
06df9bff83 add Phar->isWritable() for detecting whether a phar archive can be written to based on phar.readonly combined with actual file permissions
[DOC]
2008-04-10 03:32:10 +00:00
Greg Beaver
1c3097fcbe make built-in SplFileInfo->isWriteable() work for PharFileInfo as well, by ensuring phar->is_writeable is set/reset when phar.readonly is changed 2008-04-10 03:12:08 +00:00
Greg Beaver
abfc228f36 add addFile/addFromString/addEmptyDir. API is identical to ext/zip
[DOC]
2008-04-09 19:23:31 +00:00
Greg Beaver
e56beeeefd add PharFileInfo->getContents() to retrieve file contents
[DOC]
2008-04-09 18:12:41 +00:00
Steph Fox
c2a8b95137 Bump dev version ready for any new changes 2008-04-01 17:59:00 +00:00
Greg Beaver
54cfa7437c correct last commit (comparison of "nu" in wrong order) 2008-03-28 21:03:29 +00:00
Greg Beaver
6ff19e08f4 fix Bug #13518: comparision of a char* pointer with a string literal 2008-03-27 21:31:27 +00:00
Marcus Boerger
5b3560f069 - Ifdef out code that has if(0) and doesn't compile anyway 2008-03-27 12:54:23 +00:00
Greg Beaver
a090d45251 fix build on PHP 5.2, prepare release of 2.0.0a2 2008-03-27 06:38:53 +00:00
Greg Beaver
0084937b10 turns out it is now tomorrow, so update package.xml 2008-03-26 05:20:43 +00:00
Greg Beaver
085bb5cdd6 prepare release of 2.0.0a1 2008-03-26 03:55:37 +00:00
Marcus Boerger
7202434956 - Add documentation 2008-03-24 12:53:28 +00:00
Greg Beaver
1bda8cf708 a subtle plea for help to Marcus... 2008-03-24 03:05:24 +00:00
Greg Beaver
2e9fca4f0b fix read/write for PharData object, update tests to current API 2008-03-24 03:01:31 +00:00
Greg Beaver
b4b890cb8f check for invalid aliases, add tests for this and direct setting of stub/alias 2008-03-24 01:33:30 +00:00
Greg Beaver
cea3169ca6 prevent direct setting of stub or alias in tar/zip 2008-03-24 01:18:50 +00:00
Greg Beaver
7493b9dfb6 update TODO 2008-03-23 22:51:00 +00:00
Greg Beaver
95eeee9156 not all tests have been converted over to the new API, but it works
conversion is now split into 3 separate methods
1\) convertToZip\(\) convertToTar\(\) and convertToPhar\(\) exclusively change file format
2\) compress\(\) sets compression, accepting Phar::GZ, Phar::BZ2, or Phar::NONE
3\) convertToExecutable\(\) allows stub creation in tar/zip, convertToData\(\) prevents it

all methods return either Phar or PharData objects, allowing fluent interface.

only 1 test has been converted to the new format, but the API works
2008-03-23 22:42:45 +00:00
Greg Beaver
cac70206f2 add Phar->getPath() for retrieving the full path to the phar archive.
this is useful for renaming and also always returns the realpath()
2008-03-23 19:03:15 +00:00
Greg Beaver
ca92928b48 fix param parsing for Phar::running() to be optional
# this is the last bug for ZF app - it now works!
2008-03-23 17:36:57 +00:00
Marcus Boerger
69c71f703e - Add .cvsignore 2008-03-23 16:51:52 +00:00
Greg Beaver
27ca45f898 don't disallow opening .tar/.zip files as Phar object if readonly is disabled, the whole idea is to be able to
add crap including an automatic stub or explicit stub
2008-03-23 06:59:59 +00:00
Greg Beaver
39c4f38c27 rename Phar::getRunningPhar\(\) to Phar::running\(\) and by default return the full
phar url, if optional parameter is false, return the path to the phar on disk.  Fix a double free on failed mount
2008-03-23 06:00:31 +00:00
Greg Beaver
eea82226c1 fix potential segfault by misuse of phar_find_in_include_path 2008-03-23 05:39:58 +00:00
Greg Beaver
62ed0adcca fix memleak found by valgrind 2008-03-23 00:05:53 +00:00
Greg Beaver
15f8facded fix Bug #13110: using rewrite parameter to webPhar causes memory error 2008-03-22 22:56:04 +00:00
Greg Beaver
bf081ec2a5 add failing test for bug #13110 2008-03-22 22:44:21 +00:00
Greg Beaver
6cef8da201 move all blah++ to ++blah where possible for those with crapass compilers 2008-03-22 22:11:49 +00:00
Greg Beaver
1b05ce68d7 fix all frontcontroller tests - cgi sapi was not being detected, only fastcgi 2008-03-22 22:04:21 +00:00
Greg Beaver
01e5bbbaf5 fix memleak in php 5.2, simplify code slightly 2008-03-22 21:54:55 +00:00
Steph Fox
1feb9b581a Satisfy Greg's inertia 2008-03-22 21:54:15 +00:00
Greg Beaver
6be582b537 fix test 2008-03-22 21:53:11 +00:00
Steph Fox
c0619c6523 Make versioning more standard 2008-03-22 17:09:24 +00:00
Marcus Boerger
f022bca16b - Fix build for PHP < 5.3 2008-03-22 16:33:33 +00:00
Marcus Boerger
cc3ee90dc5 - Update and include 'channel://pear.php.net/PHP_Archive-0.11.3' 2008-03-22 01:52:12 +00:00
Marcus Boerger
eb0f0e36e1 - Still missed one debug output 2008-03-22 01:48:45 +00:00
Marcus Boerger
1b286e1475 - If multiple possible exts are found use the first one.
This fixes an issue with: phar.phar info -f install-pear-nozlib.phar
  because that archive contains a .tar file
2008-03-22 00:15:45 +00:00
Marcus Boerger
e08556eb2e - Constify 2008-03-22 00:11:43 +00:00
Marcus Boerger
4d8073056c - Don't throw exception for uninitialized instance 2008-03-21 23:56:52 +00:00
Marcus Boerger
efc1c1ea99 - Damn forgot to remove the debug code 2008-03-21 23:31:31 +00:00
Marcus Boerger
6d3bb76302 - Fix stub/hashbang generation 2008-03-21 23:22:18 +00:00
Marcus Boerger
9bfa3909bf - Fix error message 2008-03-21 23:07:44 +00:00