Client: php
Exceptions thrown through PHPExceptionWrapper are prematurely freed at the end
of the catch block, even though zend_throw_exception_object expects to take
ownership of the value.
Ensure we free return_value in case of exceptions
Patch: Håkon Hitland <hakon.hitland@zedge.net>
Patch: Roy Sindre Norangshol <norangshol@zedge.net>
This closes#1314
The PHP 7 extension can sometimes free strings it does not own,
when serializing string map keys, or the name of called methods.
The latter case was somewhat migitated since the double-free has no
effect on interned strings.
Using ZVAL_STR_COPY instead of ZVAL_STR will increment the reference
count, making the following destructor call correct.
Fix memory leak in PHP 7
Fix memory leak when deserializing maps or sets.
zend_hash_update will add its own reference to the key, so we need to
destruct the key zval to not leak.
We don't need to destruct the value, the hash table will take ownership
of it.
This closes#1152
This is an initial port of php_thrift_protocol to PHP7. However as
we deal with zval's all over the place, we opt for separating
the C files completely leading to some overhead. However this
is a good start to see the differences in the implementation. From
there we should follow up with a more unified approach by refactoring
parts of the zval handling to be more generic so we can plug it
into PHP 7 and PHP 5 extensions.
Tested this by running with TestClient.php against a CPP server
and using TBinaryProtocolAccelerated.
The file lib/php/lib/Thrift/Type/TConstant.php is missing from the php
Makefile. Therefore "make install" don't copy the TConstant.php file.
This closes#689
Client: C_glib, C++, D, Erlang, Go, Haskell, Lua, Java/Me, JavaScript, Node, Ocaml, Perl, PHP, Python, Ruby
Patch: Jens Geyer
This closes#341
Minimal server-side implementations and TODO stubs for various languages to let "make check" succeeed.
Not contained in this patch and still TODO:
- client side implementations, i.e. calls to testBinary() and appropriate tests
- server side hex printout missing for some languages
This patch adds a "json" option to PHP code generation that will
make generated classes implement JsonSerializable, so thrift
objects may be converted to json using json_encode() easily.
If the "validate" option is enabled, the object's write validator
will be called, beyond that the jsonSerialize() method only outputs
non-null fields in the JSON object (JSON parsers get grumpy if you
send them null where they expect to see a number).
Patch: Stig Bakken
Github Pull Request: This closes#219
Client: PHP
Patch: GitHub-User anjz <anartzn@gmail.com>
This closes#212
Removed `strrev` from `readDouble` and `writeDouble` functions. I found problems reading a double that was generated with the python library.
Client: PHP
Patch: Stig Bakken & Jens Geyer
Modifications made to the original pull request:
- moved TestValidators.* to lib/php/test
- created new TestValidators.thrift to house the UnionOfStrings union
- modified makefiles accordingly
This closes#159
Client: build process
Patch: jfarrell
Add check for php extension to not build if phpize has not been run,
update Vagrantfile to update package list for haskell test deps, and
change bison min version to 2.4 to work with the current versions of
debian, ubuntu and centos.