Commit Graph

1153 Commits

Author SHA1 Message Date
Greg Beaver
027180d6ee new test for bad checksum, fix tar.c to catch tar archives with a corrupted first entry, fix memleak on bad checksum 2008-04-20 17:28:54 +00:00
Greg Beaver
4abe1a0978 fix tests to match CVS 2008-04-20 17:19:24 +00:00
Greg Beaver
6d421e13b0 fix truncation test 2008-04-20 16:58:08 +00:00
Greg Beaver
f5dbaf64fc add failing test for truncated tar archive 2008-04-20 15:12:09 +00:00
Greg Beaver
8001dfd8d0 new test, increases code coverage slightly 2008-04-20 14:54:05 +00:00
Greg Beaver
5e5dd15d52 fix test to be OS-agnostic 2008-04-20 05:50:40 +00:00
Greg Beaver
41d9dde1df re-adding as binary 2008-04-20 05:49:06 +00:00
Greg Beaver
7cc7bdded7 added as text, removing in order to re-add 2008-04-20 05:48:52 +00:00
Greg Beaver
56650fa4cd amend zip test to actually test file perms creation/reading and fix severely broken permissions creation 2008-04-20 05:41:41 +00:00
Greg Beaver
4336865bb4 add new test for openoffice-created zip 2008-04-20 05:22:02 +00:00
Greg Beaver
0cf701fe4e new test for unix 'zip' command-created zip archives 2008-04-20 05:19:20 +00:00
Greg Beaver
50962003e0 fix fopen test problem - behavior is slightly different from PHP 5.2 -> PHP 5.3
now all tests pass on windows on my box
2008-04-20 04:35:14 +00:00
Greg Beaver
ab45c16a61 fix all but 1 test on windows (yay) 2008-04-20 04:19:13 +00:00
Greg Beaver
54540385b8 fix a couple more tests on windows 2008-04-20 04:10:51 +00:00
Greg Beaver
95fc6451f0 fix 98 of 105 failing tests on windows (real progress now) 2008-04-20 00:24:01 +00:00
Greg Beaver
9035dc059a fix 3 failing tests out of 108 on windows (whoop-de-doo) 2008-04-19 17:57:24 +00:00
Greg Beaver
ef0139c866 fix ZTS build 2008-04-19 17:24:41 +00:00
Greg Beaver
f870b8ae74 fix ZTS build and Phar::isValidPharFilename 2008-04-19 17:24:26 +00:00
Greg Beaver
e94aaeada9 new test for unsupported compression versions, vastly enhance error messages on unsupported compression methods, fix memleak 2008-04-19 06:18:13 +00:00
Greg Beaver
aa61e6066c new tests for corrupted zips 2008-04-19 05:58:40 +00:00
Greg Beaver
0d1e0b4311 new test for zip archives with files created from stdin 2008-04-19 05:53:57 +00:00
Greg Beaver
78c55d2f6d new test for encrypted zips 2008-04-19 05:51:10 +00:00
Greg Beaver
d3a4ecf5ab new test for central directory offset being wrong 2008-04-19 05:45:10 +00:00
Greg Beaver
bd3ddde29f new test for truncated file comment, fix memleak found by test 2008-04-19 05:39:42 +00:00
Greg Beaver
4e98585ff7 new corrupt zip test 2008-04-19 05:35:03 +00:00
Greg Beaver
531caa6393 new test for corrupted zip with mis-matched entry counts, and fix memleaks in this test case 2008-04-19 05:30:48 +00:00
Greg Beaver
410ce457ab add utility for creating corrupted zip archives for testing purposes 2008-04-19 05:15:24 +00:00
Greg Beaver
c4f502fae0 COMPLETELY rework filename extension detection. Now the only requirements are:
1 - executable phars must contain '.phar' in the filename
2 - non-executable phars must not contain '.phar' and must have an extension of at least 1 character

In addition, phar filenames must exist if opened for read, and the directory containing the phar must exist if opened for creation
if opened for creation, the file must not already exist
[DOC]
2008-04-18 04:13:13 +00:00
Greg Beaver
26e10f8cca fix compression zip tests 2008-04-16 20:26:22 +00:00
Greg Beaver
a3e723b935 add failing tests for compression of zip files internally 2008-04-16 20:15:19 +00:00
Greg Beaver
31e6629895 fix large zip test 2008-04-16 20:08:02 +00:00
Greg Beaver
159e39d81d load entire end of zip instead of weird 8k looping, logic is much simpler, and it's only 65k instead of 8k 2008-04-16 19:48:31 +00:00
Greg Beaver
8bc9ec5466 make test OS-agnostic 2008-04-16 19:47:41 +00:00
Greg Beaver
4e584728e5 fix end of directory locator detection code, add failing test for large zips 2008-04-16 04:34:25 +00:00
Greg Beaver
398bcf4dd0 fix test - metadata works now 2008-04-16 04:16:20 +00:00
Greg Beaver
8c4477cde5 fix segfault in meta-data parsing of zip archives 2008-04-16 04:15:08 +00:00
Greg Beaver
f513caa0a6 add failing test for metadata support in zip archives 2008-04-16 04:11:14 +00:00
Greg Beaver
dc837b5f53 rename is_zip parameter of phar_parse_metadata to more accurately reflect what it is 2008-04-16 04:01:33 +00:00
Greg Beaver
6eabae560b increase code coverage 2008-04-16 03:55:13 +00:00
Greg Beaver
21b84bb728 forgot F in EXPECTF 2008-04-16 03:54:06 +00:00
Greg Beaver
cd9ecb53ae increase code coverage 2008-04-16 03:54:05 +00:00
Greg Beaver
6387155b3d add another test for alias overloading and make sure we disallow it when passed in constructor 2008-04-16 03:42:29 +00:00
Greg Beaver
ae3837851a fix tests so $Revision$ does not screw with things 2008-04-16 03:27:45 +00:00
Greg Beaver
6c0564c721 increase code coverage for phpinfo(), rework CLI phpinfo for phar.extract_list to be legible 2008-04-16 03:26:20 +00:00
Greg Beaver
a12dc0ba3d increase code coverage 2008-04-15 23:46:44 +00:00
Greg Beaver
277ba45f8f re-add as binary 2008-04-15 19:26:35 +00:00
Greg Beaver
bf716e8e98 aha - added as ascii, removing in order to re-add 2008-04-15 19:25:46 +00:00
Greg Beaver
2d6ad98ed9 this was corrupted on my windows box. $1m question: is this newly regenerated phar valid on Steph's box and my unix box?
withphar.phpt and withphar_web.phpt use it
2008-04-15 19:25:06 +00:00
Greg Beaver
77b6ed3861 further big-endian systems fixes for zip 2008-04-15 19:16:47 +00:00
Greg Beaver
189b936ba3 fix test on windows 2008-04-15 18:41:03 +00:00
Greg Beaver
df32c25175 forgot to commit this yesterday - make error message test PHP-version agnostic 2008-04-15 18:33:47 +00:00
Steph Fox
cdabebdb98 - Clean files that actually exist ;) 2008-04-15 14:34:16 +00:00
Greg Beaver
1a2ac90cde truly enable APC in phar 2008-04-15 13:52:02 +00:00
Greg Beaver
9e33e0cc5b add support for proper APC caching 2008-04-15 04:56:34 +00:00
Greg Beaver
859bd13d09 add interception for readfile [DOC] 2008-04-15 03:36:57 +00:00
Greg Beaver
e465dc8711 add support for big-endian systems to zip implementation 2008-04-15 03:29:21 +00:00
Greg Beaver
a8d822ed16 fix test to be OS-agnostic 2008-04-14 22:50:52 +00:00
Greg Beaver
023d1c96ea fix invalid variable access 2008-04-14 22:39:27 +00:00
Greg Beaver
e7a8df1248 fixes test on windows. Does it break on unix? the shadow knows 2008-04-14 22:27:34 +00:00
Greg Beaver
3cd16d46c9 fix test on windows 2008-04-14 22:22:04 +00:00
Greg Beaver
9f86ad6142 fix test 2008-04-14 18:35:10 +00:00
Greg Beaver
24b6df944d complete rename code coverage tests, completely re-do errors (why are the streams funcs so dang inconsistent in error handling/return values?) 2008-04-14 18:33:12 +00:00
Greg Beaver
567870d4ef remove unused file 2008-04-14 18:16:51 +00:00
Greg Beaver
0c9fcac767 remove redundant check for file existence, add another unlink edgecase test 2008-04-14 18:03:57 +00:00
Greg Beaver
bf701fe74f disallow unlink() on extracted phars (the idea is that it is a read-only for execute thing), add tests for unlink edge cases 2008-04-14 17:54:38 +00:00
Greg Beaver
4cd9806d06 add stat test for root dir 2008-04-14 17:40:46 +00:00
Greg Beaver
754a3b9a76 add tests for extract_list and stat 2008-04-14 17:39:46 +00:00
Greg Beaver
3703d9195d nuke potential segfault in phar_open_url, remove mem leaks due to error logging in phar_wrapper_stat, add to test case 2008-04-14 17:36:48 +00:00
Greg Beaver
e00568dd6a s/l/L/ to match actual lstat errors 2008-04-14 17:31:01 +00:00
Greg Beaver
0828c08abc add test case for SEEK_CUR fseek 2008-04-14 17:24:39 +00:00
Steph Fox
ef203ea793 - Kill doze compiler warning 2008-04-14 17:23:25 +00:00
Greg Beaver
65e04335a6 add test case for inability to open extract_list file 2008-04-14 17:21:49 +00:00
Greg Beaver
e9de3a285d 2 more test coverage edge cases down 2008-04-14 17:19:55 +00:00
Greg Beaver
f3f9f52af9 minor re-factoring of phar_open_url to remove one nested brackets, put fopen edge cases in its own test, tweak test phar file names 2008-04-14 17:18:58 +00:00
Steph Fox
31596d1b45 - Fix ZTS build 2008-04-14 17:14:54 +00:00
Greg Beaver
6d06058e81 add test coverage for fopen() with append mode 2008-04-14 16:38:58 +00:00
Greg Beaver
abb0766b8f add phar.extract_list test coverage for opendir 2008-04-14 16:34:11 +00:00
Greg Beaver
19e4a6113f add test coverage for phar.extract_list and mkdir/rmdir 2008-04-14 16:30:55 +00:00
Greg Beaver
eb252c5c92 fix potential segfault if some idiot tries to remove the root directory of a phar, add creation of root directory to test 2008-04-14 16:26:01 +00:00
Greg Beaver
07e36f5cad increase code coverage further 2008-04-14 16:10:58 +00:00
Greg Beaver
e7cbf4ddfe add error message on attempt to rmdir/mkdir 'phar://', add to test 2008-04-14 16:04:11 +00:00
Greg Beaver
2c0e0e1a96 update tests to ensure all temp files are erased, and to current error messages 2008-04-14 15:58:12 +00:00
Greg Beaver
61a9b7d8ee increase code coverage slightly 2008-04-14 15:52:57 +00:00
Greg Beaver
dbf43f5e0d add test for mkdir() of sub-directory of existing file, and restore the removed free()s with an is_temp_dir test 2008-04-14 15:48:25 +00:00
Greg Beaver
4b5079f4b7 increase test coverage of phar_wrapper_mkdir, fix segfault when mkdir() on existing directory 2008-04-14 15:46:06 +00:00
Greg Beaver
2277396fe3 fix edge case where a new phar is created via mkdir(), add to dir.phpt test 2008-04-14 15:21:41 +00:00
Greg Beaver
b8865a63ae another attempt at fixing mac OS X compile, remove unused obsolete code 2008-04-14 04:47:34 +00:00
Greg Beaver
2ed2ae7e53 missing from previous commit to remove stat from opendir wrapper ops 2008-04-14 04:47:00 +00:00
Greg Beaver
e69ea0731d more test coverage and fixes from increased coverage to opendir(). dir.phpt fails, but for wrong reasons (bug uncovered that needs fix) 2008-04-14 04:44:04 +00:00
Greg Beaver
aee1be851e add fstat to 027 test. Remove phar_dir_stat, stat should not be possible on a dir handle 2008-04-13 23:57:44 +00:00
Greg Beaver
61f439c1ad add to 027 test (for code coverage) of fwrite on dir handle 2008-04-13 23:48:46 +00:00
Greg Beaver
653b67b34f minor optimization 2008-04-13 23:47:15 +00:00
Greg Beaver
6f6a6dcb0e 100% code coverage for dir handle seeking, remove error log (not used in dir seeking, causes leak), update 027 test to have seeking test 2008-04-13 23:46:15 +00:00
Greg Beaver
c22b6a76ed add test for stat interception, fix stat interception 2008-04-13 23:33:31 +00:00
Greg Beaver
dc4da5e2f9 make tests php version-agnostic with regards to stream errors 2008-04-13 21:31:46 +00:00
Greg Beaver
02bbb72f6d add test for fopen interception, fix fopen interception 2008-04-13 20:46:45 +00:00
Greg Beaver
24d5595a8f add test for file_get_contents interception, fix file_get_contents interception 2008-04-13 19:36:33 +00:00
Greg Beaver
72daaf1d44 add test for opendir, fix bugs found 2008-04-12 22:21:29 +00:00
Greg Beaver
0814b2df09 fix build if SPL is disabled 2008-04-12 21:43:39 +00:00
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
Greg Beaver
891067c975 fix the memleak - but this breaks the \*compressAllFiles\*() methods because of fatal flaw
in renaming implementation - see pecl-dev email for details
2008-03-21 19:54:07 +00:00
Greg Beaver
3fcc6565b7 with stream wrappers in include_path, and after marcus's last fix, only 1 failing test (tar/tar_makegz.phpt)
add mounted file/dir to url stat
2008-03-21 18:50:22 +00:00
Steph Fox
c11bcd5414 Deliberate test breakage (no idea how many) in an attempt to see where the valgrind 'bad news' is coming from on gcov.php.net. 2008-03-21 05:22:10 +00:00
Steph Fox
f0fdef1b64 Cosmetics (RC data) 2008-03-21 05:05:23 +00:00
Greg Beaver
d02dff1363 save work - sandbox is completely f**ed up, have to rm -rf and start again
This *SHOULD* fix issues, but I can't get run-tests to work reliably to be absolutely sure
2008-03-20 23:59:07 +00:00
Antony Dovgal
044f39293b fix 5_3 ZTS build 2008-03-17 08:55:56 +00:00
Marcus Boerger
a1cbab9142 - Rewrite scanner to be based on re2c instead of flex
The full patch is available as:
  http://php.net/~helly/php-re2c-5.3-20080316.diff.txt
  This is against php-re2c repository version 98
  An older patch against version 97 is available under:
  http://php.net/~helly/php-re2c-97-20080316.diff.txt
2008-03-16 21:06:54 +00:00
Marcus Boerger
58f7de98f4 - Fix build 2008-03-13 19:43:14 +00:00
Antony Dovgal
983ff657ba fix zts build 2008-03-13 09:57:49 +00:00
Greg Beaver
0262e844c4 implement full support and usage of phar stream in include_path, for both 5.2 and 5.3.
5.3 code expects the proposed patch for stream wrapper in include_path to be committed
5.2 code only supports phar stream wrapper in include_path.
this is a 2-step process.  After this, more magic, particularly in funcinterceptors.c will be
converted to use phar_resolve_path, which is far safer than the current implementation.

this needs windows and 5.2 testing unix/windows
2008-03-12 03:55:12 +00:00
Greg Beaver
70e30449bb fix leaked var, fixes all tests for me 2008-03-12 03:12:35 +00:00
Steph Fox
54615ca871 Fix for crash caused by unhappy c&p.
@Greg: this still doesn't fix bug #13353... not sure why
2008-03-10 19:11:16 +00:00
Steph Fox
3ee08069a6 Rename archive during compressAllFiles*()
Note: this only works for tar archives at present pending a fix for bug #13352
2008-03-09 04:46:16 +00:00
Greg Beaver
f0b329da20 pack tar structs so speed optimizations don't add extra bytes to the header
# Steph: try this and see if it fixes Bug #13353
2008-03-09 04:17:20 +00:00
Steph Fox
410c1584c6 update TODO 2008-03-07 14:59:47 +00:00
Steph Fox
5e4b47fa87 fix tests 2008-03-03 19:36:09 +00:00
Steph Fox
8343d7c139 - A bit more work on PharData creation/conversion.
- If readonly=0, why not $phardata->convertToPhar()?
- Known issue with directories creating 'as-file' copies within the archive (all formats)
@Greg/Marcus/Tony: This passes all tests on my box, 5.2/5.3/release_ts/debug_ts, and I can't find any more memleaks. Obviously this is too good to be true, so if conversion is still messy elsewhere please feel free to fix, or bug and assign to me.
2008-03-03 08:41:15 +00:00
Steph Fox
1cdade809b Going back to square one ("it works on Scott's box" - OSX 10.5, gcc version 4.0.1 (Apple Inc. build 5465)). Thanks ScottMac, David C and Philip for testing...
Possibly a gcc version issue?
2008-03-02 00:42:29 +00:00
Steph Fox
5c2be9551b Should work on all platforms now. (Testing.) 2008-03-01 22:38:10 +00:00
Steph Fox
d4cf7e47f6 Right problem, wrong solution. Also missed an '= 1' , thanks Marcus 2008-03-01 22:28:33 +00:00
Steph Fox
f96cd8fbc3 Tested this time. All's fine here, MacOSX still complaining @ present. 2008-03-01 22:04:19 +00:00
Steph Fox
66d3abac02 Untested. Killing remaining warnings under MacOSX (thanks again Philip). 2008-03-01 21:44:32 +00:00
Steph Fox
15fefd3692 All tests pass here now. Thanks Philip for reporting compiler errors that don't show on my setup. 2008-03-01 21:31:03 +00:00
Antony Dovgal
cd858fe243 fix segfault, comment out useless line 2008-02-29 13:56:46 +00:00
Steph Fox
ad0a7679ac Kill an unnecessary bit of internal docu and add 'compression' to the TODO 2008-02-28 02:09:49 +00:00
Steph Fox
413df68971 Forgot to return... not that I understand this stuff... 2008-02-28 01:16:43 +00:00
Steph Fox
9e61358eda Allow alias for phar.tar/phar.zip 2008-02-28 01:08:34 +00:00
Steph Fox
dd5196cf01 Update TODO 2008-02-27 21:41:59 +00:00
Steph Fox
001ffec19f Initial support for PharData object.
Note: two tests currently fail. IMHO we should be throwing E_ERROR on encountering a corrupted archive, not trying to throw a trail of exceptions...
New tests still to be written, not all functionality is in place yet.
2008-02-27 21:34:26 +00:00
Steph Fox
6a63b3921e Update protos. 2008-02-25 16:27:23 +00:00
Steph Fox
eaef0319d2 Make it possible to read the TODO file on a laptop :) 2008-02-25 16:15:57 +00:00
Steph Fox
4b849dcac6 Lunchbreak III 2008-02-25 15:44:21 +00:00
Steph Fox
d712008ba7 Lunchbreak II 2008-02-25 15:43:14 +00:00
Steph Fox
303b72fed3 Lunchbreak. 2008-02-25 15:41:47 +00:00
Steph Fox
f5ab70a3b9 Update reflection info 2008-02-25 12:21:19 +00:00
Steph Fox
1a3bf3619f Leftover from experimenting with zend_hash_del... 2008-02-25 11:37:08 +00:00
Greg Beaver
2d36a89d83 update TODO 2008-02-25 04:49:19 +00:00
Greg Beaver
0503140256 add little fix to phar_mount_entry to ensure path separators are unix-based on windows 2008-02-25 04:30:55 +00:00
Greg Beaver
ec7f89fe79 implement Phar::mount() for directories, add test
# opendir not yet implemented for mounted directories
2008-02-25 04:23:36 +00:00
Greg Beaver
b5c765f942 fix tests 2008-02-24 23:48:19 +00:00
Greg Beaver
d108a03553 fix --CLEAN-- 2008-02-24 23:47:13 +00:00
Greg Beaver
1ea58d0c04 fix test 2008-02-24 23:44:12 +00:00
Greg Beaver
a5a246e876 add missing declaration of phar_rename_archive 2008-02-24 23:40:14 +00:00
Steph Fox
8513db73bb A bunch of stuff to do with filename conversion. Hopefully it won't sink the ship. 2008-02-24 22:29:06 +00:00
Steph Fox
89842172e3 Updating tests. 100% pass rate here now - not sure about the rest of the world just yet (sorry Marcus). 2008-02-24 19:34:05 +00:00
Greg Beaver
a8d0c64662 fix faulty & in check for creation of phar manifest 2008-02-23 21:33:46 +00:00
Greg Beaver
588f0660e9 free mounted_dirs on error to avoid memleak 2008-02-23 21:29:57 +00:00
Greg Beaver
f6862d4a33 fix unfreed value found in tempmanifest1.phpt 2008-02-23 19:44:51 +00:00
Greg Beaver
b3a266fca8 fix double error (this fixes frontcontroller22.phpt) 2008-02-23 19:26:18 +00:00
Greg Beaver
dc43219add down to 1 failing zip test with this commit 2008-02-23 18:28:36 +00:00
Greg Beaver
94f39ee501 fix unfreed value 2008-02-23 18:26:20 +00:00
Greg Beaver
a0e5e40663 port same fix from tar.c to zip.c 2008-02-23 18:24:41 +00:00
Greg Beaver
2eb4db8d79 best fix for the bad logic in tar.c, now all tests pass that should 2008-02-23 18:17:48 +00:00
Greg Beaver
18444e3b5a revert previous changes to tar.c, fix incorrect user_stub == dummy check, now things work that should 2008-02-23 18:14:44 +00:00
Greg Beaver
a561228843 revert previous changes to tar.c, fix incorrect user_stub == dummy check, now things work that should 2008-02-23 18:09:31 +00:00
Greg Beaver
0c647b5c1c fix test, missing phar.readonly=0 --INI-- section 2008-02-23 18:08:54 +00:00
Greg Beaver
9d9bd2715a that !zend_hash_exists should be zend_hash_exists 2008-02-23 15:07:02 +00:00
Greg Beaver
a1828999c5 fix unfreed stuff when adding default stub 2008-02-23 15:05:05 +00:00
Greg Beaver
0e6457b2cf free spprintf'ed stub after using it 2008-02-23 14:59:52 +00:00
Greg Beaver
0996c1ffb5 fix test - needed phar.readonly=0 INI section 2008-02-23 14:57:59 +00:00
Marcus Boerger
2f29db8333 - Fix logic 2008-02-23 13:04:59 +00:00
Steph Fox
b2dbfbc321 As the line below says - there shouldn't be an exception here. 2008-02-21 18:51:54 +00:00
Steph Fox
20836262c8 Updated wrong expectation (different stub). 2008-02-21 18:44:06 +00:00
Steph Fox
9a1e7ee88b Update tests to accommodate those two extra bytes 2008-02-21 15:20:46 +00:00
Steph Fox
cf9bbcc2e6 Satisfy the pedants :) 2008-02-21 14:48:41 +00:00
Steph Fox
e8e85afbcc Updating conversion tests to check for more conversion parameters than one. Note that these will all fail against current CVS.
@Greg: We need to clarify conversion policy across the board.
2008-02-21 14:45:44 +00:00
Steph Fox
eb7565451d s/zip/tar 2008-02-21 14:27:19 +00:00
Steph Fox
6cc2426ff1 A much better solution for setDefaultStub(). The convertTo*() fixes should be trivial now. 2008-02-21 00:24:38 +00:00
Steph Fox
15158bf49d Fix filenames 2008-02-20 19:26:40 +00:00
Steph Fox
d8bebd7259 Implement $phar->setDefaultStub()
Note that Phar::createDefaultStub() still exists at this point
2008-02-20 19:22:12 +00:00
Steph Fox
9752739cf2 Let's have reflection reflect reality... 2008-02-20 17:58:56 +00:00
Steph Fox
3285ceba7e Take some of the pain out of stub rewrites. (Full default stub is tested elsewhere.) 2008-02-20 14:28:49 +00:00
Steph Fox
8febc7fd54 Fix 'clean' sections 2008-02-20 13:33:00 +00:00
Steph Fox
6306029051 Move supporting files to their own directory (toplevel tests) 2008-02-20 13:11:40 +00:00
Steph Fox
89217ae543 Fix clean section 2008-02-19 03:24:18 +00:00
Steph Fox
76b02cca40 Update tests to match new stub length 2008-02-19 03:12:11 +00:00
Steph Fox
7bb00d024e Allow createDefaultStub() to accept 0, 1 or 2 parameters. Default for both CLI and web is 'index.php'.
@Greg: this breaks a handful of tests due to the change in stub.h - will fix in a bit. The only one that's interesting is you can't do strlen(Phar::createDefaultStub()) and expect anything other than an exception now.
2008-02-18 21:45:02 +00:00
Steph Fox
335e57e443 Fix ZTS build (again), kill unused var 2008-02-18 04:51:04 +00:00
Greg Beaver
ba9fcf62fc add initial support for hashing mounted directories. Actual matching of mounted directories is not yet supported. 2008-02-18 04:45:42 +00:00
Steph Fox
87626d56d2 Fix ZTS build *nicely* 2008-02-18 04:42:04 +00:00
Greg Beaver
6798dc44ed add Phar::mount() to manually mount a file or directory
# TODO: implement directory mounting.  Involves scanning paths that are not exact matches for a partial match.
# this also means maintaining a per-phar hash of mounted directories for quick matching
2008-02-18 04:32:50 +00:00
Greg Beaver
9c62ef1124 add externally parsed files to temporary manifest (this will be made
optional and must be explicitly enabled per-phar)
2008-02-18 03:37:51 +00:00
Steph Fox
6acac494ab Fix ZTS build 2008-02-18 00:46:07 +00:00
Greg Beaver
54ff8c3a8f begin work on ability to mount files from external locations as if they were inside of a phar archive 2008-02-15 05:01:40 +00:00
Greg Beaver
f72ce59e95 remove refcount hack to workaround zlib memleak fixed in zlib
intercepted file functions now fall through if the file is not found in the phar, this allows access to external libraries
actually use include_path for locating files for inclusion and in file_get_contents/fopen when include_path is requested.
This allows applications like Zend Framework MVC implementation to function properly
2008-02-13 15:00:31 +00:00
Steph Fox
2a5f1ba3a6 Add missing SKIPIF, rename vars for readability 2008-02-12 16:55:50 +00:00
Steph Fox
2ad96985c7 - it helps if you add the new files :) 2008-02-12 16:42:35 +00:00
Steph Fox
85e641ebb4 Make tests/tar in line with tests/zip. 2008-02-12 16:39:59 +00:00
Greg Beaver
592635d0c0 fix TSRM build 2008-02-12 05:38:01 +00:00
Greg Beaver
97484e0b95 update TODO to reflect must-haves prior to 2.0 2008-02-12 05:36:02 +00:00
Greg Beaver
22d05677c1 fix test (all tests pass on unix now) 2008-02-12 05:30:59 +00:00
Greg Beaver
3234e78ca1 fix remaining broken tests broken by the addition of phar->fp closing 2008-02-12 05:28:06 +00:00
Greg Beaver
2f1ec934af fix some of the failing tests due to non-reopened phar fp 2008-02-12 05:16:53 +00:00
Steph Fox
b1ed2e8059 There's a difference between 'BORKED' and 'FAILED'... 2008-02-11 21:05:47 +00:00
Steph Fox
ef46f3e3a2 Funnily enough those frontcontroller tests still pass here! Investigating... 2008-02-11 20:55:44 +00:00
Steph Fox
914c94d497 kill a couple of msvc warnings 2008-02-11 20:53:05 +00:00
Greg Beaver
ba002c5b9c revert last commit to phar_object.c
fix open file pointers issue on windows
2008-02-11 17:13:18 +00:00
Greg Beaver
4c68617106 add destructor for Phar object to decrease refcount 2008-02-11 16:49:53 +00:00
Greg Beaver
d659ce7a0c fix windows pathname issues 2008-02-11 07:33:20 +00:00
Greg Beaver
8cd58822c3 fix TSRM and 5.2 build 2008-02-11 06:58:56 +00:00
Greg Beaver
ca7ae5d190 update TODO 2008-02-11 06:54:46 +00:00