Commit Graph

211 Commits

Author SHA1 Message Date
Josip Sokcevic
cc935b5554 THRIFT-4373: Derefer PHP zval _TSPEC (#1401)
Client: php
2018-04-09 08:47:47 -04:00
Robert Lu
68707d9219
THRIFT-4474: Use PSR-4 autoloader by default
Client: php

This closes #1479
2018-03-15 11:05:30 +01:00
James E. King III
14991f9041 THRIFT-4354: fix php socket blocking behavior
Patch: Robert Lu <robberphex@gmail.com>
Client: php

This closes #1384
2018-03-06 09:53:21 -05:00
Robert Lu
2471efab00 THRIFT-4477: php TBufferedTransport must have underlying transport
Client: php

This closes #1484
2018-01-30 07:49:20 -05:00
Robert Lu
12f124c19a THRIFT-4475: PSR-2 support for lib/php/test
Client: php

This closes #1482
2018-01-29 15:44:43 -05:00
Robert Lu
b03ca01cc9 THRIFT-4460: Use PSR-2 as php library coding standard
Client: php

This closes #1472
2018-01-24 00:07:54 -05:00
Robert Lu
bfba370bf1 THRIFT-4459: reduce php library directory depth
Client: php

This closes #1471
2018-01-16 09:22:42 -05:00
Robert Lu
a15060acd8 THRIFT-4423: migrate to psr-4
Client: php

This closes #1445
2018-01-11 09:37:37 -05:00
Robert Lu
e54945551f add stdc++ back for php extension build
Client: php

This closes #1400
2017-10-26 12:02:20 -04:00
Robert Lu
9dff0efc1e THRIFT-4356: fix segment fault for thrift_protocol
NOTE: drops php5 support for PHP extension (thrift_protocol)
however library still can support PHP5 as evidenced by CI build
Client: php

This closes #1385
This closes #1391
2017-10-25 08:57:04 -04:00
董菲
1df2d9b801 THRIFT-4353: support php ext read data after message begin
Client: php

This closes #1383
2017-10-25 08:56:40 -04:00
Thomas Petazzoni
1744cdcb67 configure.ac, Makefile.am: introduce THRIFT variable to support cross-compilation
The thrift build system currently assumes that the thrift compiler is
always available in $(top_builddir)/compiler/cpp/thrift. However, in a
cross-compilation context, this location contains the thrift compiler
built for the target... which obviously will not run on the build
machine.

In order to support such cross-compilation situation, we introduce the
THRIFT variable as a an argument for the configure script (using
AC_ARG_VAR). If not specified, it defaults to the existing value of
using compiler/cpp/thrift from the build directory, but it can be
overridden when calling ./configure.

Note that $(top_builddir) cannot be used within the configure script,
so we simply use `pwd`, which is the same as the top_builddir.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This closes #1336
This closes #1350
2017-09-09 07:50:54 -07:00
James E. King, III
d7142b7e4f THRIFT-4295: rework the docker build images, updating them and tuning the travis builds
This closes #1340
2017-09-04 18:09:34 -07:00
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