Commit Graph

229 Commits

Author SHA1 Message Date
Greg Beaver
abde85c420 add rmdir() support, add rmdir to dir test
fix *extremely* ancient problem where phar_wrapper_stat always returned success indicating the file existed
rename phar_destroy_manifest to phar_destroy_manifest_entry
2008-01-09 03:47:22 +00:00
Greg Beaver
9f5b3a229f fix empty directories in phar, add test 2008-01-09 00:58:37 +00:00
Greg Beaver
b93b48663d complete set of new tests for zip-based phars (need to test compression for zip-based phars)
fix a whole bunch of zip-related bugs
tar tests need some naming
add phar information to error messages, fix existing tests to reflect this
2008-01-08 07:08:46 +00:00
Greg Beaver
0c346d9aec add tar-based to 2 tests 2008-01-07 22:22:27 +00:00
Greg Beaver
36efc2a907 eliminate potential double-free of alias
major improvement of zip/tar-based phar stub execution, now __FILE__ says it is the phar, and not phar/.phar/stub.php,
so that the same stub can be used for phar or tar/zip-based phars
ridiculous speedup of rename() within a phar (something like 1000%)
last of the tar-based phar fixes
new tests for tar-based phars, fix existing tests to use new format of __FILE__
2008-01-07 22:21:10 +00:00
Greg Beaver
e78819fc01 new tests 2008-01-07 18:07:10 +00:00
Greg Beaver
5767e570b4 make test OS-agnostic 2008-01-07 18:05:23 +00:00
Greg Beaver
d9d91f424b fp must be nulled on every write also when == phar->fp or we get stale fp and problems. add new test that unearthed this problem 2008-01-07 17:58:31 +00:00
Greg Beaver
4a59f700f1 add tar-based to test names 2008-01-07 17:41:30 +00:00
Greg Beaver
b18b960e17 new tests 2008-01-07 17:40:43 +00:00
Greg Beaver
9e179e4b93 fix test 2008-01-07 05:46:12 +00:00
Greg Beaver
ff1c8b2beb new tests for tar format 2008-01-07 05:35:18 +00:00
Greg Beaver
826e98be83 eliminated memleak, now to make it recognize "dir" as a directory 2008-01-06 05:28:27 +00:00
Greg Beaver
0f94226b71 new test, exposes some memleaks, but not yet sure where they are (done for today) 2008-01-05 23:26:24 +00:00
Greg Beaver
632a633154 fix segfault, add separate tar test for readonly=0 on corrupted tar 2008-01-05 23:02:23 +00:00
Greg Beaver
2fa568b7b0 do not attempt to create a new phar if a file exists and is corrupted or is not a phar archive,
i.e. require a clean slate - a non-existent file or a valid phar archive - to muck around with phar contents
add the first tar-based phar test
2008-01-05 22:46:54 +00:00
Greg Beaver
ec0cd27f0d modify test to ensure that query string is preserved when munging server vars 2008-01-05 22:04:58 +00:00
Greg Beaver
2410cc96b6 complete tests for Phar::mungServer 2008-01-05 22:02:33 +00:00
Greg Beaver
efc22a3726 new tests, fix mime type overrides (all web front controller primary features are now tested and working for regular phar files) 2008-01-05 06:14:43 +00:00
Greg Beaver
e864f512bb new test, free resources on error in webPhar() (thanks new test\!) 2008-01-05 05:47:47 +00:00
Greg Beaver
dd11d4f64e new test 2008-01-05 05:12:44 +00:00
Greg Beaver
41762671c8 new test 2008-01-05 04:30:30 +00:00
Greg Beaver
8f79663143 new test 2008-01-05 04:27:01 +00:00
Greg Beaver
3a27729fd8 new test 2008-01-05 04:12:24 +00:00
Greg Beaver
b859c9dd4b beautify 404 error handler, and note missing file.
throw exception if webPhar() is attempted with an extracted file, as webPhar() makes no sense on-disk
2008-01-05 04:03:33 +00:00
Greg Beaver
2fd9f17353 clarify test names 2008-01-05 03:50:13 +00:00
Greg Beaver
08b7b76418 fix Location header for index if request has a /, 2 new tests, add index.php to frontcontroller phar 2008-01-05 03:49:01 +00:00
Greg Beaver
1549f54264 clarify test name 2008-01-05 03:42:05 +00:00
Greg Beaver
653dc9e8ce fix front controller tests (requires patch to run-tests.php posted to internals a little while ago)
allow phars to have extension .php as last resort
fix phar-based phars for MIME_OTHER type
2008-01-05 03:41:43 +00:00
Greg Beaver
67688371f7 use zip_free() instead of zip_close(), and don't add a stub if it already exists in phar_zip_flush(), update TODO 2008-01-04 17:04:41 +00:00
Marcus Boerger
2eecfbf94e - Change 'print' to 'die' for skip notices 2008-01-04 16:26:44 +00:00
Marcus Boerger
4aec466e95 - Pendantic changes 2008-01-04 14:06:50 +00:00
Greg Beaver
652d39c330 add zip-based phar support. not quite working is webPhar(), not sure why yet 2007-12-31 22:42:40 +00:00
Greg Beaver
02c7ff1343 complete re-factoring of front controller. Now it is done with
Phar->webPhar():
<?php
Phar::webPhar();
__HALT_COMPILER();

With the above stub, the default front controller will kick in.  An array of mime type overrides, and another
array mapping phar file entry -> redirected entry can be used to further customize
[DOC]
2007-12-23 21:12:42 +00:00
Greg Beaver
d443c76bed new test for front controller 2007-12-22 07:47:15 +00:00
Greg Beaver
8e4cc4b3dd first attempt at major new feature: default front controller for web
Currently, an entire phar entry is leaked for no obvious reason, otherwise it works.  Sample code:
The phar has to be created using Phar->useFrontController(); and the stub performs actual resolution of which file to load:
<?php
Phar::mapPhar();
include 'phar://' . __FILE__ . '/' . substr($_SERVER['REQUEST_URI'], strlen(basename(__FILE__)));
__HALT_COMPILER();
?>

Phar automatically determines mime type from the file extension and either parses or displays the file.  Modification of REQUEST_URI
and other variables should happen in the stub
[DOC]
2007-12-22 07:46:53 +00:00
Greg Beaver
185a4a8309 on second thought, hooking into getcwd() is a bad idea, who uses this for code loading, anyways? 2007-12-21 04:49:25 +00:00
Greg Beaver
0d830a27ea implement cleaning of crap paths - major functionality boost 2007-12-20 23:12:40 +00:00
Greg Beaver
2222da9493 making progress (include magic works) 2007-12-19 03:17:05 +00:00
Greg Beaver
0c51d58138 [unfinished] magically handle getcwd() and fopen() with include_path inside phar
this work is incomplete, but compiles and existing tests pass
2007-12-18 17:01:24 +00:00
Greg Beaver
7fa0b43518 fully implement Phar->copy(), fix test 2007-12-16 06:31:00 +00:00
Greg Beaver
427e54dcd9 add failing test 2007-12-16 01:11:50 +00:00
Greg Beaver
bb4096ff29 Phar->buildFromIterator now can also accept a stream handle as a value in addition
to a file path (string) or SplFileInfo object
[DOC]
2007-12-14 19:45:22 +00:00
Greg Beaver
f01adb0048 fix test 2007-12-14 18:54:54 +00:00
Greg Beaver
052dcfcbae fix test 2007-12-14 18:37:49 +00:00
Greg Beaver
16c8adf0c1 fix test 2007-12-14 05:22:53 +00:00
Greg Beaver
3b356d5ed8 new test
now, SplDirectoryIterator can be used directly with Phar->buildFromIterator() in order to populate the
files in a phar archive.  When combined with a RegexIterator and other filters, it becomes very easy to create
a phar archive with 1 line of code
[DOC]
2007-12-13 05:22:06 +00:00
Greg Beaver
6e78306595 new test 2007-12-13 01:20:25 +00:00
Greg Beaver
4f2d1674ca new test 2007-12-13 01:14:13 +00:00
Greg Beaver
c1a6037cf2 fix test, new test 2007-12-13 01:12:10 +00:00