Greg Beaver
d5fd042872
bump 1.3.0 to 2.0.0, this is a big feature addition release
2008-01-19 19:51:14 +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
e4c02a6b96
do fancy-shmancy zip dependency validation because ZEND_MOD_OPTIONAL_EX doesn't do any version validation
2008-01-17 05:52:18 +00:00
Greg Beaver
535865e908
give up on gpg signing because of non-existent windows support for gpg signing lib
2008-01-17 03:19:44 +00:00
Greg Beaver
d1eda9c8ac
add Phar::convertToTar(), Phar::convertToZip(), and Phar::convertToPhar()
2008-01-16 07:24:39 +00:00
Greg Beaver
4df43510b9
make zip optional
2008-01-12 05:17:12 +00:00
Greg Beaver
e9ee7dbfc5
fix compile on windows
...
remove internal libzip
add required dep on zip (will make optional in a few minutes)
2008-01-12 04:32:19 +00:00
Greg Beaver
8fb4205a8d
add Phar::interceptFileFuncs()
...
To intercept fopen(), file_get_contents(), opendir(), and all the stat-based functions so that
code like "if (is_readable('./config.inc.php'))" actually works inside of a phar
[DOC]
2008-01-11 07:30:03 +00:00
Greg Beaver
ab4c2caf4b
add interception of is_dir(), file_exists() and file_get_contents() - will make these optional shortly
2008-01-10 15:13:00 +00:00
Greg Beaver
f6b16061d1
implement whole-file compression of phars for phar/tar-based phars
...
still not 100% working, add failing test
add Phar::isCompressed(), which returns either 0, Phar::GZ, or Phar::BZ2
[DOC]
2008-01-09 07:09:04 +00:00
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
1a3624494e
implement mkdir (compiles, not yet tested), support for empty directories in phar (not yet tested)
...
revert last commit of efree(), it's necessary.
2008-01-08 22:14:16 +00:00
Greg Beaver
4bce48417b
split stream file handlers into stream.c and directory handlers into dirstream.c
2008-01-08 20:31:54 +00:00
Greg Beaver
63adb98f78
split out zip functions
2008-01-08 19:40:23 +00:00
Greg Beaver
e8a5b20514
replace crappy $_SERVER munging with explicit munging via
...
Phar::mungServer(). This static method takes an array with one of these 4 indices (case-sensitive):
'PHP_SELF', 'SCRIPT_NAME', 'SCRIPT_FILENAME', 'REQUEST_URI'
and removes any reference to the actual path on the server. This allows older apps to function unmodified inside a phar.
the variables are re-registered as PHAR_PHP_SELF and company to allow access from clever script files
[DOC]
2008-01-04 04:57:11 +00:00
Greg Beaver
8ee4266b3f
initial tar support - a few kinks to work on in phar creation, but read works
2008-01-03 04:45:00 +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
e861913e39
fix windows build
...
# there HAS to be a better way to do this...
2007-12-24 21:40:54 +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
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
d4eccb4471
holy cow - include/fopen/cwd magic fully working on unix now for windows testing
2007-12-19 04:37:25 +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
8a614e30db
use thread-safe global var to store zend_compile_file, and restore the current zend_compile_file, not the one we
...
found in MINIT
2007-12-11 19:28:35 +00:00
Greg Beaver
4bcb68a4e8
fix errors found in delMetaData(), add get/delMetaData() to MetaData read test
2007-11-25 05:04:40 +00:00
Greg Beaver
e34be4f8bc
preliminary work on using gnupg to verify/create signatures - no implementation, just phpinfo() output and build rules
2007-11-24 04:30:08 +00:00
Greg Beaver
eb67969b73
fix Bug #12124 : Phar object cannot be iterated over
...
remove unused variables
fix jit file open sprintf calls
2007-10-04 03:33:21 +00:00
Greg Beaver
33347b19f2
when opening an internal file read-only, recycle the phar archive's fp. This makes phar twice as fast (2.21x according to callgrind)
2007-08-30 02:30:16 +00:00
Greg Beaver
543ad01efd
move to 1.3.0 development
...
add Phar::delete()
2007-08-25 01:32:35 +00:00
Greg Beaver
5d8919938d
fix issue with large number of open file handles killing php with large phars on creation
...
- close file handles that have no references for entries
- add just-in-time re-processing of file handles
- make sure file size is set in renaming
- add old_flags to phar_entry_info so we can decompress when flushing a modified entry whose fp is closed
2007-08-17 04:47:50 +00:00
Marcus Boerger
27ca5af569
- Increment extension version
2007-05-18 17:54:24 +00:00
Marcus Boerger
5e3af23d20
- Reduce overhead of Phar's RINIT
2007-05-16 23:16:51 +00:00
Marcus Boerger
4dfa232bf9
- Add forward declaration
2007-05-15 20:43:24 +00:00
Marcus Boerger
440691899c
- Optimize flushing, don't generate metadata twice
2007-05-14 19:14:00 +00:00
Marcus Boerger
c7d70d0f7c
- This is version 1.2.0 now due to fix of Phar::canWrite()
2007-05-09 19:34:00 +00:00
Marcus Boerger
3ec87dc3e4
- Prepare release 1.1.0
2007-04-12 20:58:09 +00:00
Marcus Boerger
ab15beebbf
- Compatibility with suhosin
2007-03-27 21:28:22 +00:00
Greg Beaver
e97b1aefbf
fix memleak in external dirs
...
update package.xml
move API to 1.1.0
update package version to 1.1.0RC1
update API test
2007-03-26 16:42:47 +00:00
Greg Beaver
a92eeb61c4
[DOC]
...
implement setSignatureAlgorithm() and add class constants Phar::MD5, Phar::SHA1, Phar::SHA256, Phar::SHA512, Phar::PGP
2007-03-26 00:00:56 +00:00
Marcus Boerger
c42a870b7e
- Add general SHA-2 support by optional pecl/hash dependency
...
# We actually need support to select the signature type somehow
2007-03-25 21:43:49 +00:00
Marcus Boerger
b983973a1d
- Add ini: phar.extract_list
...
- Add Phar::getExtractList
- Both allow to set a mapping <phar-file> to <extract-dir>
[[DOC]]
2007-03-25 19:03:38 +00:00
Marcus Boerger
20ffb00422
- Include spl_iterators.h
2007-02-08 22:50:15 +00:00
Greg Beaver
bc17dcfcd1
fix several potential segfaults, add tests for chmod(), fix chmod()
2007-02-06 17:09:37 +00:00
Greg Beaver
40b66a8035
copyright year updates
2007-02-05 21:38:50 +00:00
Marcus Boerger
08cf9ff731
- Check for illegal chars (control + potential UTF-8 (need to take care of in PHP 6))
2007-02-05 07:58:29 +00:00
Marcus Boerger
f210205e70
- PHP_VERSION_ID exists only in newer PHPs (5.1+)
...
- Improve error checking
2007-02-04 20:10:03 +00:00