Greg Beaver
7fa0b43518
fully implement Phar->copy(), fix test
2007-12-16 06:31:00 +00:00
Greg Beaver
f11103a9a1
Phar::copy() [not yet working]
2007-12-16 00:57:39 +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
2c77090174
better fix, revert unintentional commit to Makefile.frag
2007-12-14 04:10:14 +00:00
Greg Beaver
63f3d5958d
fix build on windows, fix segfault in tsrm by uninitialized pointer
2007-12-14 04:08:34 +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
d243f9ff99
code re-organize to make it more logical
2007-12-13 01:16:56 +00:00
Greg Beaver
38b35f1448
Phar->buildFromIterator: fix another mem leak, fix test
2007-12-13 01:05:59 +00:00
Greg Beaver
5051732d4c
kill 1 memleak
2007-12-13 01:01:27 +00:00
Greg Beaver
463731e2de
Phar->buildFromIterator: use spl_iterator_apply(), add 4 tests (mem leaks not yet fixed in the 4th)
2007-12-13 00:54:15 +00:00
Greg Beaver
5af85b4f8f
implement Phar::buildFromIterator()
...
first argument is an iterator that returns as values paths to files to add to the phar archive
the key should be the path that the file should be saved as within the phar archive
if the optional second parameter is passed, then the key is ignored and substr(value, strlen(base_directory)) is
used as the save path within the phar archive
[DOC]
2007-12-12 18:01:40 +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
bdff161e87
WS (spaces instead of tabs)
2007-11-24 04:09:01 +00:00
Greg Beaver
a72251be6e
experimental support for optional bz2 extension - should make windows users a whole lot happier
2007-11-24 04:06:44 +00:00
Greg Beaver
be023d6f62
much better fix for the problem of phar://c:\path\to\blah.phar
...
don't use php_parse_url() at all, and always unixify paths on copied strings.
our modification was modifying the zval original string, so a user would pass in
phar://c:\path\to\blah.phar
and their string would change to phar://c:/path/to/blah.phar - bad.
Now using
include 'phar://' . __FILE__ . '/index.php';
works on both unix and windows seamlessly, as well as $a = new Phar(__FILE__)
for use in the loader stub
2007-11-19 23:10:05 +00:00
Greg Beaver
9d7d44d60c
typo
2007-11-16 04:17:37 +00:00
Greg Beaver
999961f080
begin win32 fixes for Phar object - still have a problem I can't track down yet, but it's only a matter of time before it is killed too
...
when passing in a full path with drive letter to the Phar object, we were
then passing "phar://C:/path/to/blah.phar" to php_parse_url(), which
thinks it is getting a valid url scheme "phar", host "C" path "/path/to/blah.phar"
we now pass "phar:///C:/path/to/blah.phar" to make it fail, and then properly
parse the url inside phar
2007-11-13 05:57:14 +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
ccb840fb92
add missing /* }}} */
2007-08-25 01:36:21 +00:00
Greg Beaver
543ad01efd
move to 1.3.0 development
...
add Phar::delete()
2007-08-25 01:32:35 +00:00
Greg Beaver
5178a94545
add test for pre-existing alias failure, fix source to fail if alias already exists
2007-08-23 23:23:26 +00:00
Greg Beaver
0bd0d85673
implement Phar->setAlias()
2007-08-23 04:49:39 +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
511bd55758
- Make compatible with PEAR/PHP_Archive CVS
2007-05-28 18:07:49 +00:00
Marcus Boerger
f2cec0600c
- Make Pahr::loadPhar() and Phar::mapPhar() respect extract list
2007-05-21 16:43:53 +00:00
Marcus Boerger
05459db504
- Better handling of alias = NULL
2007-05-19 16:06:49 +00:00
Marcus Boerger
8e561453ec
- Add Phar::getAlias()
2007-05-18 17:50:39 +00:00
Marcus Boerger
c1c9d21ec4
- Add Phar::isValidPharfilename() really
2007-05-18 05:48:20 +00:00
Marcus Boerger
5e3af23d20
- Reduce overhead of Phar's RINIT
2007-05-16 23:16:51 +00:00
Marcus Boerger
b83a515920
- Add Phar::delMetadata()
...
- Add Phar::hasMetadata()
- Add Phar::isValidPharFilename()
2007-05-15 20:42:38 +00:00
Marcus Boerger
35299957c7
- Add Phar::getSupportedCompression()
2007-05-14 18:31:18 +00:00
Marcus Boerger
e289a06c83
- Flush on changes
2007-05-14 18:11:53 +00:00
Marcus Boerger
6e3ac5dbcd
- Add PharFileInfo::hasMetadata() & delMetadata()
2007-05-14 17:13:07 +00:00
Marcus Boerger
7aa7448a32
- Fix Phar::canWrite(), had inverted logic
...
- Support PHP & builds
2007-05-09 18:09:41 +00:00
Greg Beaver
0deb79b705
fix tests, add missing break to setSignatureAlgorithm()
2007-03-26 00:29:22 +00:00
Greg Beaver
4af9e7192b
update note
2007-03-26 00:03:53 +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
Greg Beaver
18cb2d59d4
rename begin/isFlushingToPhar/commit to startBuffering/isBuffering/stopBuffering
2007-03-22 16:31:46 +00:00
Marcus Boerger
5dfeed6e14
- Simplify
2007-02-13 17:56:37 +00:00
Marcus Boerger
ac73e981c4
- Inherit interface ArrayAccess correctly
2007-02-13 17:39:46 +00:00
Marcus Boerger
e8e7815e89
- Fix offset writing
2007-02-13 01:19:58 +00:00
Johannes Schlüter
30dad44aa3
- Add possibility to check for a specific compression method
2007-02-06 23:56:39 +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
70dc64e95a
add PharFileInfo->chmod() to set permissions (no other way to do it)
2007-02-06 05:41:18 +00:00
Greg Beaver
40b66a8035
copyright year updates
2007-02-05 21:38:50 +00:00
Marcus Boerger
250119fa38
- Fix signed/unsigned warnings
...
- Use safe_emalloc where usefull
2007-02-05 20:34:23 +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
Marcus Boerger
725148cc94
- Allow building with 5.1 (not all works thenperfectly though)
2007-02-03 16:31:36 +00:00
Marcus Boerger
d47db8526b
- Fix protos
2007-02-03 13:42:10 +00:00
Marcus Boerger
1b5b78ce18
- Provide both version strings, api and ext
2007-02-03 13:20:12 +00:00
Greg Beaver
93b387d327
fix mem leak on error, fix cwd issue. go back to BadMethodCallException for Phar->set*CompressedAllFiles(). ALL TESTS PASS, RELEASE IS IMMINENT
2007-02-03 04:04:18 +00:00
Greg Beaver
340e9b24fc
s/isFlushing/isFlushingToPhar much clearer purpose in method name
2007-02-03 00:45:24 +00:00
Marcus Boerger
5f8256cfc1
- Update TODO
...
- Add Phar::isFlushing()
- Improve test
2007-01-30 20:58:14 +00:00
Greg Beaver
c7a5d062f5
throw exceptions from Phar object, and errors from stream wrapper
...
# we need to account for uncaught exceptions in shutdown, 2 tests leak because of this
2007-01-29 06:02:19 +00:00
Greg Beaver
c6dc9be489
implement Phar->getMetadata() Phar->setMetadata(), add tests, implement meta-data in the header
2007-01-29 03:59:55 +00:00
Marcus Boerger
0bc1b90ec3
- Split commit into commit and setStub
2007-01-28 22:11:28 +00:00
Marcus Boerger
8cfaa44955
- Make new flushing work
2007-01-28 21:26:54 +00:00
Marcus Boerger
d13719ace8
- In Commit reset donotflush
2007-01-28 19:56:09 +00:00
Greg Beaver
2273af3104
beginWrite()/commitWrite() => begin()/commit(), note optional rollback() for 1.1
2007-01-28 19:09:12 +00:00
Marcus Boerger
834337f85a
- Fixx illeagal memory access
2007-01-28 10:43:18 +00:00
Greg Beaver
e8cabb46f6
fix commitWrite test, enable creation of Phars with phar object
2007-01-28 05:40:18 +00:00
Greg Beaver
2513903e40
stream context for specifying meta-data
2007-01-28 03:25:53 +00:00
Marcus Boerger
d4fb3cb4d3
- Fix warning
2007-01-27 21:37:22 +00:00
Marcus Boerger
d5bbd84d76
- Prevent memory corruption
2007-01-27 21:23:02 +00:00
Greg Beaver
a9901f31db
fix uncompressAllFiles() and compressAllFilesBZIP2(), add tests
2007-01-27 19:37:17 +00:00
Greg Beaver
035ddeb1cd
php_stream_truncate_set_size() is a noop with temp streams.
...
so, we're going to use a brand new tempfile for truncation.
ALL TESTS PASS NOW (finally)
2007-01-27 19:26:58 +00:00
Greg Beaver
78f1b9401b
fix memleak in unlink()
2007-01-27 18:27:19 +00:00
Marcus Boerger
ced8e1d9d1
- Make phar_flush() work without reloading
...
- Make refcounting fly
2007-01-27 15:31:24 +00:00
Marcus Boerger
9cd8d73677
- Simplify by providing delref function
2007-01-26 19:58:22 +00:00
Greg Beaver
8de7bd61bf
implement phar refcounting
...
move setStub to commitWrite() and add beginWrite()
# many oo-based tests still fail, they need to be tweaked and fixed
2007-01-26 14:52:10 +00:00
Antony Dovgal
d6af95d1a4
fix folding and a couple of typos
2007-01-23 23:31:14 +00:00
Marcus Boerger
ed454d0fc8
- Finish get/setStub()
2007-01-22 00:59:02 +00:00
Marcus Boerger
ea5e9b3190
- Add Phar::getStub(), step 1
2007-01-22 00:17:14 +00:00
Greg Beaver
27f4a3ad30
add setUncompressed(), setCompressedGZ(), setCompressedBZ2() to PharFileInfo, and a failing test (due to bug in streams + bug in phar)
2007-01-22 00:13:20 +00:00
Greg Beaver
9c2651d210
X Phar->setStub() for specifying a new stub to the phar [Greg]
2007-01-21 23:22:57 +00:00
Marcus Boerger
d0d87d8435
- Rewrite/Finish metadata handling
2007-01-21 20:12:50 +00:00
Marcus Boerger
4529362c29
- Per defautl class Phar returns Info class on offsetGet()
2007-01-21 17:40:27 +00:00
Marcus Boerger
3066cfb3ef
- Disable most of class Phar and all of class PharFileInfo if SPL is not present
2007-01-21 15:25:50 +00:00