Commit Graph

288 Commits

Author SHA1 Message Date
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
dc43219add down to 1 failing zip test with this commit 2008-02-23 18:28:36 +00:00
Greg Beaver
0c647b5c1c fix test, missing phar.readonly=0 --INI-- section 2008-02-23 18:08:54 +00:00
Greg Beaver
0996c1ffb5 fix test - needed phar.readonly=0 INI section 2008-02-23 14:57:59 +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
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
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
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
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
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
22d05677c1 fix test (all tests pass on unix now) 2008-02-12 05:30:59 +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
Greg Beaver
1a6fb65c83 new test for special tar-based app and more iteration test 2008-02-11 06:47:26 +00:00
Greg Beaver
3ade59e537 update test phars 2008-02-11 01:07:53 +00:00
Greg Beaver
15410a4f66 make maximum manifest size 100MB for phar archives, simple apps are hitting the 1 MB limit quite easily. 2008-02-08 05:56:26 +00:00
Greg Beaver
4e42110f3e remove test accidentally added 2008-02-08 05:08:18 +00:00
Greg Beaver
e3c64bd53b fix memory leaks. There are some leaks in libz that I can't fix, but none triggered in the current tests 2008-02-08 04:26:41 +00:00
Greg Beaver
e67c584348 [DOC]
refactor the $rewrites parameter in Phar::webPhar.  Now it is a callback
that accepts the path requested.  This callback should return the actual filename
requested as a string, or false to deny access as HTTP 403.
Also fix incorrect munging of SCRIPT_NAME variable in mungServer
More importantly, Phar::webPhar now finds the filename hidden in:
http://localhost/myphar.phar/internal/file.php/extra/stuff
as 'internal/file.php' in phar 'myphar.phar' with REQUEST_URI '/internal/file.php/extra/stuff'
this will allow pharring up apps that use REQUEST_URI for front controller stuff.
2008-02-07 23:42:03 +00:00
Greg Beaver
1cac0aa8e2 fix webPhar() in CGI sapi, update tests to reflect reality of how these ENV vars are passed 2008-02-07 04:24:58 +00:00
Steph Fox
ed2785e2a5 OK so let's kill the bug-hider 2008-01-30 00:53:56 +00:00
Steph Fox
76640a615f - One last tweak (so Phar and no-phar work the same again now)
- Bunch of test fixes
- Note: I added a silencer to the unlink() call in zip/tarmaker to avoid system warnings here. If this messes up tests elsewhere we'll need to re-think.
2008-01-29 11:58:27 +00:00
Greg Beaver
f4e4ad0cd1 fix PharFileInfo->setAlias (was wildly broken)
fix directory creation in zip archives
update zip tests to use phar to create the zip, and then copy to a new file
2008-01-28 20:18:15 +00:00
Steph Fox
618a29411d Get rid of zip requirement in the last few tests
@Greg: zip/tarmaker.inc needs a rewrite
2008-01-28 16:49:28 +00:00
Steph Fox
975a1b87af Get rid of zip requirement 2008-01-28 16:31:56 +00:00
Greg Beaver
6cdabede4c remove ext/zip dependency entirely, write better native zip support
re-organize, create util.c, move entry_info/archive_data/entry_data access methods to this file
refactor entry->fp, now this is abstracted with phar_get_efp() and phar_seek_efp(), fixes all weird dependency issues
permanently solve the "millions of file pointers" issue for read access.  All compressed files are read into a single
temporary stream, and their constraints are controlled by the entry->fp abstraction

Improvements in this zip implementation over ext/zip:
 * full read/write support for bzip2 compressed files
 * much more efficient access for accessing only a few files within large zip files, as crc/header validation is
   done just-in-time
 * full stream support for opendir/rename/rmdir/mkdir as well as all of the other stream funcs
 * full support for setting file perms via Phar::chmod(), stored as zip-standard extra field
 * no problem with large zips and many open file pointers

# TODO: add big-endian system support for tar/zip file format headers, otherwise the implementation is complete
# TODO: test on windows and fix any windows-specific issues
# TODO: verify zips created work with unzip/winzip/windows explorer and so on
2008-01-28 08:52:08 +00:00
Steph Fox
6f95353e77 - Added is_writable() check on temp directory
- Regenerated stub and tests/nophar.phar
- Fixed tests
2008-01-26 00:12:00 +00:00
Steph Fox
ddc051cebe - Rewrite stub to take up slightly less space
- Fix tests
- Test phars should probably be regenerated, although only one fails here currently (nophar.phar in web context)
2008-01-25 17:26:18 +00:00
Greg Beaver
47a60c4f16 fix 2 tests, add phar.readonly checks to rmdir/mkdir 2008-01-22 20:24:52 +00:00
Greg Beaver
f51bf6118c fix tests to match CVS 2008-01-22 05:26:38 +00:00
Greg Beaver
117f5e2639 add web-based support for default stub, now phars written with webPhar() will work
out of the box regardless of server configuration with phar file format
split up stub.h strings into 2046 byte chunks because MS VC 6 is friggin stupid
2008-01-20 00:49:45 +00:00
Greg Beaver
a5358c0725 bump API version if the created phar has directories in it, so that it won't load with older phar versions 2008-01-19 18:30:30 +00:00
Greg Beaver
d583fae0cc add Phar::createDefaultStub(), which can take as an argument the filename
that should be loaded as a "bootstrap" for the phar archive
2008-01-19 04:26:22 +00:00
Greg Beaver
7540adf058 major improvement:
the new default stub allows creation of phars that run identically
1) with Phar extension
2) without Phar extension
3) extracted to disk from the phar
this makes the default phar format quite interesting as it eliminates the only drawback of the extension
2008-01-18 05:42:16 +00:00
Greg Beaver
5689f3c9c6 add new test for opening a zip-based phar with no zip ext, update skipif for phar_convert test 2008-01-17 20:17:40 +00:00
Greg Beaver
0e934c70d7 add optional whole-file compression to convertToTar/convertToPhar 2008-01-16 21:09:32 +00:00
Greg Beaver
d1eda9c8ac add Phar::convertToTar(), Phar::convertToZip(), and Phar::convertToPhar() 2008-01-16 07:24:39 +00:00
Greg Beaver
cb40b39b5b add support for creation of gzipped and bzipped tar-based phars 2008-01-15 23:41:44 +00:00
Greg Beaver
ba707bad4c fix test (make OS-agnostic) 2008-01-14 06:25:22 +00:00
Greg Beaver
505247b6ef fix test to be OS-agnostic
# steph - this is a different test from the one I fixed earlier, I think that's the confusion :)
2008-01-14 06:23:10 +00:00