Commit Graph

198 Commits

Author SHA1 Message Date
Roy Sindre Norangshol
ec64f23d23 THRIFT-4263: Fix use after free bug for thrown exceptions
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
2017-08-12 20:11:26 -07:00
Klaus Trainer
48ea3cde08 THRIFT-4218: Set TCP_NODELAY for PHP client socket
Client: PHP
Patch: Klaus Trainer

This closes #1283
2017-06-06 13:59:53 +02:00
James E. King, III
c6ded922c5 THRIFT-4154: properly close socket whether it is persistent or not on close()
Client: php

This closes #1011
This closes #1233
2017-04-01 23:26:54 -04:00
kufd
1360270eb8 THRIFT-4126: implement required fields validation in php extension when validate compiler option is enabled
Client: php

This closes #1215
2017-03-30 16:42:11 -04:00
Håkon Hitland
e66b8fcde3 THRIFT-3984 PHP7 extension causes segfault
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
2017-02-23 11:43:45 -05:00
Swati Kumar
3590f1e7ca THRIFT-4072 php: TCurlClient - Add the possibility to send custom headers
Client: php

This closes #1178
2017-02-09 15:12:47 -05:00
James E. King, III
3a8bbbd4a6 THRIFT-3896 fix map type with string key can not access deserialized by php extension
Client: php
Patch: feidong@anjuke.com

This closes #1062
2017-02-06 12:57:21 -05:00
Håkon H. Hitland
2a89bd94ac THRIFT-3977 PHP extension creates undefined values when deserializing sets
Client: PHP
Patch: Håkon H. Hitland <haakon@likedan.net>

This closes #1133
2016-11-17 21:36:06 +01:00
Håkon Hitland
b7a213c818 THRIFT-3348 PHP TCompactProtocol bool&int64 readvalue bug
Client: PHP
Patch: Håkon Hitland <hakon.hitland@zedge.net>

This closes #1132
2016-11-17 21:21:08 +01:00
visoeclipse
22ec64f88a THRIFT-3844 thrift_protocol cannot compile in 7.0.7
This closes #1021 and closes #971
2016-09-26 01:42:02 +09:00
myroslav.kosinskyi
dd9885e322 THRIFT-3839 Performance issue with big message deserialization using php extension
This closes #1014
2016-09-26 01:42:02 +09:00
jfarrell
311c98455a THRIFT-948: SSL socket support for PHP
Client: php
Patch: Mansi Nahar

Adds TSSLServerSocket and TSSLSocket to PHP
2016-09-20 13:30:16 -04:00
Nobuaki Sukegawa
527637ac3c THRIFT-3827 Fix CompactProtocol readI64 function
cleanup (#1054)
2016-08-20 18:40:41 +09:00
lnn1123
77e5f3a3a3 THRIFT-3827 Fix CompactProtocol readI64 function
This closes #1008 and closes #1052
2016-08-20 18:37:53 +09:00
Mark Goldfinch
4ab9a88496 THRIFT-3764: Ensure PHP TSimpleJSONProtocol and TMultiplexedProtocol files included during "make install"
This closes #969
2016-03-29 12:03:34 +09:00
Nobuaki Sukegawa
73d16378c5 More make dist entries 2016-03-19 23:53:05 +09:00
Nobuaki Sukegawa
37a122271f THRIFT-3647 Fix php extension build warnings
Client: PHP
Patch: Nobuaki Sukegawa

This closes #878
2016-02-20 00:45:35 +09:00
David Soria Parra
496454a4b0 THRIFT-3514: Add PHP 7 version of php_thrift_protocol
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.
2016-01-07 20:40:07 +01:00
Atsushi Takayama
aede97523d THRIFT-3318 PHP: SimpleJSONProtocol Implementation
Client: PHP
Patch: Atsushi Takayama

This closes #602
2015-12-02 02:03:53 +09:00
Roger Meier
a43063caac THRIFT-3451 thrift_protocol PHP extension missing config.m4 file
This closes #718
2015-11-28 13:41:30 +01:00
Maxime Mouial
622ef03f1b THRIFT-3309: Missing TConstant.php in /lib/php/Makefile.am
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
2015-11-14 11:04:01 +01:00
Phongphan Phuttha
90ea4f64c1 THRIFT-2779: Always write unescaped JSON unicode string.
Client: PHP
Patch: Phongphan Phuttha

This closes #666
2015-11-11 00:32:55 +09:00
Stig Bakken
d6ca81b2cc PHP Compiler: always cast scalar types in jsonSerialize() 2015-10-29 23:01:37 +02:00
jfarrell
f13e431bab THRIFT-3305: Missing dist files for 0.9.3 release candidate
Client: build
Patch: jfarrell

Adds missing files to dist
2015-08-25 00:39:29 -04:00
Nobuaki Sukegawa
113b638790 THRIFT-3148 Markdown links to coding_standards are dead
This closes #491
2015-05-13 21:40:26 +02:00
Jens Geyer
89cffc6f76 THRIFT-3126 PHP JSON serializer converts empty or int-indexed maps to lists
Client: php/test/Test/Thrift/JsonSerialize/JsonSerializeTest.php
Patch: Stig Bakken <stig@zedge.net>

This closes #479
2015-05-05 21:10:50 +02:00
Konrad Grochowski
3bc6424c76 THRIFT-2724 - Coding standards template added all over project
Client: All
Patch: Konrad Grochowski

This closes #371
2015-02-05 12:15:19 +01:00
Jens Geyer
8bcfdd98ae THRIFT-2886 Integrate binary type in standard Thrift cross test
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
2015-01-03 17:37:54 +01:00
Jens Geyer
4991574b5e THRIFT-2884 Map does not serialize correctly for JSON protocol in Go library
Reverted commit 0a378709ab
See JIRA for details
2014-12-13 23:48:33 +01:00
Jens Geyer
119869a204 THRIFT-2779 PHP TJSONProtocol encode unicode into UCS-4LE which can't be parsed by other langurage bindings
Client: PHP
Patch: Liangliang He <lliang.he@gmail.com>

This closes #313

This closes #244
2014-12-10 20:54:14 +01:00
Konrad Grochowski
3b5dacba44 THRIFT-2849: spelling errors fixed using codespell tool
Client: All
Patch: Anatol Pomozov

This closes #281
2014-11-24 10:55:31 +01:00
Roger Thomas
6fb5923711 THRIFT-2807 PHP CS Fix
This closes #252

Patch: Roger Thomas
2014-11-16 22:41:20 +01:00
Roger Meier
964082a8eb THRIFT-2712 PHP: add "json" option to create JsonSerializable code
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
2014-10-08 23:41:18 +02:00
Jens Geyer
79f988c27a THRIFT-2768: Whitespace Fixup
Client: General (Makefile.am)
Patch: Jens Geyer

Reverted makefile.am - tabs are not optional there
2014-10-03 20:42:54 +02:00
Jens Geyer
aaa8947f3a THRIFT-2768: Whitespace Fixup
Client: General (Makefile.am, *.thrift)
Patch: Jens Geyer

DocTest.thrift has NOT been changed, the trailing whitespaces are part of the test case.
2014-10-03 20:30:38 +02:00
Jens Geyer
eb393ac3cd THRIFT-2701 Update TCompactProtocol.php
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.
2014-09-29 22:47:44 +02:00
Jens Geyer
a86886e77d THRIFT-2704 - compiler: T_ONEWAY type used for oneway methods instead of T_CALL
Patch: Konrad Grochowski

This closes #216
2014-09-17 22:36:00 +02:00
Roger Meier
db8751b1bc THRIFT-2673 PHP: generated Service_method_result code should not have validators
Patch: Stig Bakken
2014-09-01 21:58:07 +02:00
Roger Meier
6aacd4cc71 THRIFT-2394 TCurlClient: an HTTP transport implementation using libcurl
Client: PHP
Patch: Oran Kelly
2014-07-26 00:19:02 +02:00
Jens Geyer
577f407df9 THRIFT-2632 add "validate" option to generate read/write validation code
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
2014-07-25 00:13:27 +02:00
jfarrell
30a472e04f THRIFT-2602: Fix missing dist files
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.
2014-07-10 18:42:30 -04:00
jfarrell
4c8506e30d Thrift-2602:Fix missing dist files
Client: build process
Patch: jfarrell

Introduced a bug in 8fd8c63 adding gen files to the dist, removing those
files from the EXTRA_DIST.
2014-07-10 14:17:49 -04:00
jfarrell
8fd8c6366d THRIFT-2602:Fix missing dist files
Client: build process
Patch: jfarrell

Add all missing files to the dist package.
2014-07-10 09:14:51 -04:00
Roger Meier
f9fbda8f42 THRIFT-1926 PHP Constant Generation Refactoring
remove author tag
2014-07-06 12:33:38 +02:00
Jens Geyer
bc2ca4e5d7 THRIFT-1926 PHP Constant Generation Refactoring
Client: PHP
Patch: Xavier HAUSHERR
2014-07-04 21:45:55 +02:00
Jens Geyer
6d1a83aa48 THRIFT-2506 Update TProtocolException error codes to be used consistently throughout the library
Patch: Jens Geyer
2014-05-03 00:49:05 +02:00
jfarrell
26c68ea149 THRIFT-1908: Using php thrift_protocol accelerated transfer causes core dump
Client: php
Patch: Tyler Hobbs

Reverts THRIFT-1453 to fix issue with coe dumps seen in the php lib.
2014-04-11 00:15:16 -04:00
Jens Geyer
8001421b88 THRIFT-2434 Missing namespace import for php TMultiplexedProcessor implementation
Patch: Mauro Maggi
2014-04-01 21:24:27 +02:00
Jens Geyer
d21032ad40 THRIFT-2439 Bug in TProtocolDecorator Class causes parsing errors
Patch: Gianluca Bargelli
2014-03-31 19:21:27 +02:00
Jens Geyer
e8ca73f62f THRIFT-2425 PHP: Server-side support for Multiplexing Services
Patch: Aldo Armiento
2014-03-24 21:41:12 +02:00