Commit Graph

184 Commits

Author SHA1 Message Date
Roger Meier
87afaacb95 THRIFT-1822 PHP unit test does not work
Patch: Roger Meier
2013-01-06 20:10:42 +01:00
Roger Meier
0193149842 THRIFT-1801 Sync up TApplicationException codes across languages and thrift implementations
Patch: Andrew Cox
2012-12-22 21:31:03 +01:00
Jake Farrell
7c7a5e05ba Thrift-1721:Dist broken due to 0.8.0 to 0.9.0 changes
Client: build
Patch: Jake Farrell

Fix dist build to create the 0.9.0 release



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1396880 13f79535-47bb-0310-9956-ffa450edef68
2012-10-11 00:29:11 +00:00
Roger Meier
819ad6ed3f remove unused stuff
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1395316 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 14:56:05 +00:00
Jake Farrell
78a54a17f1 THRIFT-1521:patches for more Performance
Client: php
Patch: D. Edler

Removes double function calls in the transport classes to strlen.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1390051 13f79535-47bb-0310-9956-ffa450edef68
2012-09-25 18:58:27 +00:00
Roger Meier
814818e779 THRIFT-1615
cleanup: remove empty stuff


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1381333 13f79535-47bb-0310-9956-ffa450edef68
2012-09-05 20:07:52 +00:00
Roger Meier
21c0a85079 THRIFT-1615 PHP Namespace (was Thrift for Symfony 2)
Patch: Xavier HAUSHERR


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1381323 13f79535-47bb-0310-9956-ffa450edef68
2012-09-05 19:47:14 +00:00
Roger Meier
0b92274003 THRIFT-1597 TJSONProtocol.php is missing from Makefile.am
Patch: Andrew Grumet


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1335717 13f79535-47bb-0310-9956-ffa450edef68
2012-05-08 19:42:33 +00:00
Roger Meier
7c7679198f THRIFT-1577 Compile thrift with php module for php 5.4.0 failed. need to replace function_entry with zend_function_entry
Patch: Matrix Ji

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1327152 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 16:03:21 +00:00
Jake Farrell
c00d83b26a Thrift-1453:Don't change types of arguments when serializing with thrift php extension
Client:php
patch: Dave Watson

Don't change types of arguments when serializing with thrift php extension



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236972 13f79535-47bb-0310-9956-ffa450edef68
2012-01-28 03:57:58 +00:00
Roger Meier
ac70b5f832 THRIFT-1478 TJSONProtocol in PHP
fix: remove dist and add lunit log format

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1235467 13f79535-47bb-0310-9956-ffa450edef68
2012-01-24 20:18:07 +00:00
Roger Meier
33b720a958 THRIFT-1478 TJSONProtocol in PHP
Patch: Greg Fodor, Andrew Grumet, Roger Meier

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1235403 13f79535-47bb-0310-9956-ffa450edef68
2012-01-24 18:42:46 +00:00
Jake Farrell
b03a59cc5c Thrift-1427: PHP library uses non-multibyte safe functions with mbstring function overloading
Client: php
Patch: Bryan Alves

Fixes issue with php overloaded mbstring to be binary-safe for strlen and substr.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1207960 13f79535-47bb-0310-9956-ffa450edef68
2011-11-29 16:45:51 +00:00
Jake Farrell
711c70c786 Thrift-1393: TTransportException's thrown from THttpClient contain superfluous slashes in the Exception message
Client : php
Patch: Nick Jones

The THttpClient class ensures the $uri_ property has a slash prefixed by appending one if needed in the constructor. However in THttpClient::read, there are 2 exceptions thrown where a slash is concatenated between the port and uri. This results in a superfluous slash in the TTransportException message.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1185723 13f79535-47bb-0310-9956-ffa450edef68
2011-10-18 15:31:17 +00:00
Jake Farrell
51700649d0 Thrift-1377: abort PHP deserialization on unknown field type
client: php
Patch: Dave Watson

Previously the code incorrectly ignored unknown field types. After
reading the field header, if it was an unknown type it would incorrectly
assume there was no data, and start trying to read the next field
immediately. 



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1179907 13f79535-47bb-0310-9956-ffa450edef68
2011-10-07 00:17:25 +00:00
Jake Farrell
b5c618a66d Thrift-1240: TBinarySerializer.php invalid serialization due to TBufferTransport not flushing last chunk of data into TMemoryBuffer
Client: php
Patch: Marimuthu Ponnambalam

Simple Serialization errors out, due to the TBufferTransport not flushing the data into TMemoryBuffer after $object->write($protocol) in TBinarySerializer.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1161968 13f79535-47bb-0310-9956-ffa450edef68
2011-08-26 02:42:14 +00:00
Bryan Duxbury
11dfc8bb73 THRIFT-1225. php: TCompactProtocol for PHP
Patch: Dave Watson

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1146185 13f79535-47bb-0310-9956-ffa450edef68
2011-07-13 18:15:41 +00:00
Bryan Duxbury
2323aa9c1c THRIFT-1228. php: The php accelerator module calls flush incorrectly
This patch makes sure that filling the php extension's internal buffer does not cause a premature flush of the whole transport.

Patch: Nathaniel Cook

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1141668 13f79535-47bb-0310-9956-ffa450edef68
2011-06-30 18:59:18 +00:00
Jake Farrell
ebf0bec670 Thrift-1152: attributes from private to protected
patch: jfarrell
clent: php

Changing the TForkingServer children_ from private to protected



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1095434 13f79535-47bb-0310-9956-ffa450edef68
2011-04-20 15:23:26 +00:00
Jake Farrell
10ed8e814f THRIFT-1144: PHP client Attributes from private to protected
Updating private variable for persistant connections in TSocket to protected.


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1091897 13f79535-47bb-0310-9956-ffa450edef68
2011-04-13 19:42:35 +00:00
Bryan Duxbury
d26cb9b325 THRIFT-690. php: Update TApplicationException codes
Patch: Nicholas Telford

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1091150 13f79535-47bb-0310-9956-ffa450edef68
2011-04-11 17:59:27 +00:00
Bryan Duxbury
d3fceb02d4 THRIFT-1098. php: Undefined properties in TBinaryProtocolFactory
Corrected some typos. 

Patch: Torben Brodt

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1083882 13f79535-47bb-0310-9956-ffa450edef68
2011-03-21 18:04:08 +00:00
Bryan Duxbury
e7b1864d46 THRIFT-867. php: PHP accelerator module's output transport is incompatible with TFramedTransport
This patch prevents TFramedTransport from flushing empty frames.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1076918 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 01:35:17 +00:00
Bryan Duxbury
c46f32ce18 THRIFT-638. php: BufferedTransport + C extensions block until recv timeout is reached on last fread call
This patch refactors TSocket to make use of stream_select() for timeout detection. 

Patch: Nicholas Telford

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1076917 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 01:25:17 +00:00
Bryan Duxbury
f1ed926969 THRIFT-1067. php: Tons of bugs in php implementation
Patch: Ruslan Usifov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1073446 13f79535-47bb-0310-9956-ffa450edef68
2011-02-22 18:20:13 +00:00
Bryan Duxbury
7d1517aa4c THRIFT-1067. php: Tons of bugs in php implementation
Patch: Ruslan Usifov

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1073444 13f79535-47bb-0310-9956-ffa450edef68
2011-02-22 18:17:23 +00:00
Bryan Duxbury
c0e2ef50b7 THRIFT-999. php: Add TForkingServer
Patch: Nick Jones

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1063814 13f79535-47bb-0310-9956-ffa450edef68
2011-01-26 18:25:17 +00:00
Bryan Duxbury
cecbe0fc52 THRIFT-347. php: PHP TSocket Timeout Issues
This patch appears to correct the infamous timeout issues.

Patch: Tyler Hobbs

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1036684 13f79535-47bb-0310-9956-ffa450edef68
2010-11-19 00:06:51 +00:00
Mark Slee
052bbef327 THRIFT-952. TBinarySerializer utility class for converting between byte strings and PHP objects
Adds a nice TBinarySerializer class to make it simple to convert between PHP objects and serialized strings using the Binary protocol.

Patch: Radu Marin


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1021521 13f79535-47bb-0310-9956-ffa450edef68
2010-10-11 21:45:13 +00:00
Bryan Duxbury
ded25bbe0d THRIFT-941. php: Make PHP C Extension use the defined Protocol writeMessageBegin function
This patch causes the C extension to call into user-land to get the correct writeMessageBegin function.

Patch: Chris Goffinet

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1004864 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 00:23:30 +00:00
David Reiss
653eadab2f THRIFT-841. Exclude generated php and erlang Makefiles from "make dist"
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1004509 13f79535-47bb-0310-9956-ffa450edef68
2010-10-05 02:38:58 +00:00
Bryan Duxbury
89200e1c9d THRIFT-854. php: Provide configure option and make rules to build/install php extension
This patch adds a make target in lib/php that builds the php extension. By default configure will attempt to build this, but it can be disabled with --without-php_extension.

Patch: Anthony Molinaro

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@989226 13f79535-47bb-0310-9956-ffa450edef68
2010-08-25 17:09:02 +00:00
Bryan Duxbury
184d26237a THRIFT-851. php: php extension fails to compile on centos 5.x
This patch introduces an approach that is compatbile with both centos and Mac.

Patch: Todd Lipcon

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@986410 13f79535-47bb-0310-9956-ffa450edef68
2010-08-17 17:43:58 +00:00
Bryan Duxbury
7b1128c94f THRIFT-682. php: PHP extension doesn't compile on Mac OS X
This patch adds a bswap_64 implementation for OS X users.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@985050 13f79535-47bb-0310-9956-ffa450edef68
2010-08-13 00:17:16 +00:00
David Reiss
cf8fc15fa0 THRIFT-837. php: Fix accelerator bug affecting writes > 8k
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@985038 13f79535-47bb-0310-9956-ffa450edef68
2010-08-12 23:27:54 +00:00
Bryan Duxbury
17115d7a52 THRIFT-778. php: PHP socket listening server
This patch which adds TServerTransport/TServerSocket, along with a generic TServer and TSimpleServer implementation.

Patch: Nick Jones

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@984864 13f79535-47bb-0310-9956-ffa450edef68
2010-08-12 16:59:19 +00:00
Bryan Duxbury
7c74d9bfb1 THRIFT-780. php: Prevent aborts due to simultaneous exceptions
The bug was triggered when flush() threw an exception in the
PHPOutputTransport destructor.

The PHPOutputTransport in thrift_protocol_write_binary() wasn't
constructed inside of the try block, so exceptions thrown when it was
auto-flushing in the destructor were calling terminate().

Move the transport construction inside of the try block, and add an
explicit flush before the transport is destroyed (since throwing an
exception from a destructor is generally a bad thing).

Patch: David Reiss

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@984815 13f79535-47bb-0310-9956-ffa450edef68
2010-08-12 15:00:41 +00:00
Bryan Duxbury
b149bc7050 THRIFT-718. php: Thrift PHP library includes closing tags and extraneous whitespace
This patch trims closing tags to avoid potential for whitespace.

Patch: Nicholas Telford

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@984811 13f79535-47bb-0310-9956-ffa450edef68
2010-08-12 14:54:33 +00:00
David Reiss
1873fed342 THRIFT-647. php: Add license header and fix style in Makefile.am
The attachment was made with the "licensed for inclusion" option, so it
should get a standard Apache license header.  Our other makefiles use
$() style for variables and don't include extra spaces before
backslashes.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940936 13f79535-47bb-0310-9956-ffa450edef68
2010-05-04 16:32:33 +00:00
Bryan Duxbury
6a68187338 THRIFT-647. php: PHP library is missing install target
This patch adds a 'make install' target to a new PHP makefile. 

Patch: Anthony Molinaro

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940325 13f79535-47bb-0310-9956-ffa450edef68
2010-05-02 22:39:31 +00:00
David Reiss
eb598b8c89 THRIFT-755. php: Fix compilation as a static module
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@934036 13f79535-47bb-0310-9956-ffa450edef68
2010-04-14 17:33:01 +00:00
David Reiss
006260f07a THRIFT-659. php: Make php_thrift_protocol handle std::exception cleanly
Any std::exceptions thrown from within the extension will now be
converted into php exceptions.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920662 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 05:19:20 +00:00
David Reiss
3bb5e0581a THRIFT-683. Remove profanity
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@902941 13f79535-47bb-0310-9956-ffa450edef68
2010-01-25 19:31:31 +00:00
David Reiss
70c89d4ae0 THRIFT-350. php: Fix the extension build when C++ is not already used
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@793630 13f79535-47bb-0310-9956-ffa450edef68
2009-07-13 17:21:03 +00:00
Bryan Duxbury
af3b6309b5 THRIFT-349. php: Accelerated binary protocol serialization segementation fault
Check to make sure that the object being serialized has a valid struct spec, error otherwise.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@773976 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 16:53:23 +00:00
Bryan Duxbury
c2a9245d25 THRIFT-499. php: Thrift_protocol PHP extension does not handle signedness correctly
Cast all the number types to signed values before making PHP longs out of them.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@773974 13f79535-47bb-0310-9956-ffa450edef68
2009-05-12 16:44:52 +00:00
Bryan Duxbury
def30a6072 THRIFT-387. Add appropriate Apache header to all code files
This hits all the documentation and some misc code files that have avoided the license up to this point.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763048 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 00:19:37 +00:00
David Reiss
deda141392 THRIFT-388. Create a "ONEWAY" message type that is an alias for "CALL"
Pave the way for a new message type for oneway function calls.
For now, just define the constant in all languages and make
server implementations treat it the same way as a normal call.
Only C++ and Erlang currently check the message type (on the
server side).

There is a little bit of redundancy in the Erlang code, but
the alternative is a bit gross, and this split-up will be
necessary eventually when we start handling one-way calls
differently.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761389 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 19:22:31 +00:00
David Reiss
887bd33772 Remove obsolete php extension tag
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760218 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 22:52:39 +00:00
David Reiss
f82aee5087 THRIFT-387. Add license statements to some autoconf macro files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760216 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 22:52:29 +00:00
David Reiss
ea2cba8ba8 THRIFT-387. Add license headers to a bunch of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760189 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:35:00 +00:00
David Reiss
be648eee8c THRIFT-404. php: Make TPhpStream work for cli (cgi) scripts
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758526 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 06:14:45 +00:00
David Reiss
5ab303c165 php: Improve some docblock comments for TSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@758516 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 04:27:47 +00:00
Bryan Duxbury
13083d6d52 THRIFT-294. Remove @author tags
They're gone. Don't add any new ones!



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756307 13f79535-47bb-0310-9956-ffa450edef68
2009-03-20 02:19:46 +00:00
David Reiss
a9ea68b907 Make the PHP generator dynamic.
- Modify the PHP generator constructor to fit the new generic interface.
- Register the PHP genrator with the central registry.
- Deprecate the old way of invoking the PHP generator.
- main.cc no longer includes t_php_generator.h.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@745238 13f79535-47bb-0310-9956-ffa450edef68
2009-02-17 20:28:24 +00:00
Mark Slee
fc8a1e0469 THRIFT-169: Fixes framed/buffered transport state on underlying flush failure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@704710 13f79535-47bb-0310-9956-ffa450edef68
2008-10-14 22:00:36 +00:00
David Reiss
1f5ce50186 THRIFT-99. php: Add scheme (http[s], etc.) support to THttpClient
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680211 13f79535-47bb-0310-9956-ffa450edef68
2008-07-27 23:41:13 +00:00
David Reiss
1931b12be0 php: Fix an undefined variasble in an error message
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@677698 13f79535-47bb-0310-9956-ffa450edef68
2008-07-17 19:36:34 +00:00
dweatherford
e4dc4f5366 [thrift] Propogate exceptions from transports in thrift_protocol extension
Summary: Otherwise, it will spin forever if your socket connection gets dropped
  or otherwise times out.
Reviewed by: dbraginsky
Test plan: Modified TSocket to always throw an exception on read() and tried
  some service calls
Revert: svn


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665652 13f79535-47bb-0310-9956-ffa450edef68
2008-04-11 02:51:44 +00:00
dweatherford
0b8a382c00 [thrift] Error checking for T_OBJECT serialization
Summary: Avoid segfaulting via calling zend_fetch_class_entry on something
  that might not actually be an object; throw an exception instead.
Reviewed by: shire


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665581 13f79535-47bb-0310-9956-ffa450edef68
2008-03-25 03:15:10 +00:00
dweatherford
840ca085fc [thrift] php thrift_protocol crash fixes
Summary: The convert_to_*_ex functions were being used improperly resulting
  in heap corruption in some cases; I just switched everything over to the
  non-ex versions since it shouldn't matter if I modify the value being
  serialized in place to coerce it to the proper type.

  Also fixed a potential crash for map, set, and list types when not passed
  an array, by first attempting an array conversion and then throwing a
  tprotocolexception if that doesn't succeed. (Actually, PHP might fatal there
  instead, it wasn't immediately clear from reading the code if that would
  be the case).

Reviewed by: marcel
Test plan: Ran under php-5.2.5, debug and release builds. No more heap corruption
  or memory leak complaints (the latter also a side effect of undesired zval
  reference separation).
Revert: only if you love SIGSEGV


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665566 13f79535-47bb-0310-9956-ffa450edef68
2008-03-08 05:51:24 +00:00
dweatherford
9b945da3ca [thrift] ZTS fixes for thift_protocol extension
Summary: Now the threadsafe build compiles!
Reviewed by: mcslee
Test Plan: compiles, ship it
Revert: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665558 13f79535-47bb-0310-9956-ffa450edef68
2008-03-06 03:11:08 +00:00
lucas
f8f21e769e restore tags/1.0.0, we need these at least until fb9 is rolled everywhere
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665557 13f79535-47bb-0310-9956-ffa450edef68
2008-03-05 22:04:13 +00:00
dweatherford
cf997a45c6 [thrift] PHP thrift_protocol extension, revision 2.0
Summary:
  All PHP serialization and deserialization can now happen in extension-land,
  which should be much faster. This includes reading message headers and all
  complex types (structs, exceptions, whatever).

  The compiler has been updated to always emit the $_TSPEC static array for
  generated PHP code, since the new extension depends on it.

  As before, the PHP code gates enabling the accelerated serialization on
  the protocol being an instance of TBinaryProtocolAcclerated and the function
  for the [de]serialization operation existing.

  The function names have changed since the last version of the extension,
  so old and new generated code can coexist, and new generated code can run on
  a server with the old extension (but it will not use accelerated serialization).

Reviewed by: hzhao
Test Plan: Generated a couple of endpoints and called their services through the
  new extension. Both use a variety of nested complex types. Built and ran the
  extension in php-5.2.3 in debug mode, killed the reported memory leaks.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665548 13f79535-47bb-0310-9956-ffa450edef68
2008-03-04 01:08:23 +00:00
eletuchy
260a5fa08e [thrift] grrrr ... TPhpStream can read the string '0'
Summary: php sucks

    Reviewed By: mcslee

    Test Plan: thrift call with string '0' has same behavior as string '1'

    Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665477 13f79535-47bb-0310-9956-ffa450edef68
2008-02-13 22:41:03 +00:00
David Reiss
0c90f6f8af Thrift: Whitespace cleanup.
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.

Reviewed By: mcslee

Test Plan: git diff -b

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 22:18:40 +00:00
Mark Slee
97264864df is_a is deprecated, instanceof only takes vars or constants
Summary: Solution, dummy static class var to use instanceof

Reviewed By: dweatherford

Test Plan: Regen'd some mobile code in trunk using this


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665401 13f79535-47bb-0310-9956-ffa450edef68
2007-12-20 03:23:27 +00:00
David Reiss
bef54c0647 Thrift: Fix a backwards change.
Summary:
Got it right in trunk, but wrong in thrift.

Blame Rev: 69504

Reviewed By: mcslee

Test Plan:
Tested in trunk AND did a diff with trunk.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665378 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 20:15:11 +00:00
Mark Slee
d0f5b28835 Fix typo in Thrift trunk
Summary: $classl => $class


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665376 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 04:29:25 +00:00
Mark Slee
e02ab33cb8 Lowercase autoload strings
Summary: PHP is undebatably the worst programming language in the world. Class names are case insensitive, so new $tHiNg = new $THing. Garbase. Now autoload has to deal with the fallout.

Reviewed By: dreiss

Test Plan: autoload enabled falcon code


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665375 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 04:17:49 +00:00
Mark Slee
645ecea714 Kill fast binary compliance in TBase, it doesn't work
Reviewed By: akhil

Test Plan: Regenerate code


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665374 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 02:46:24 +00:00
Mark Slee
276eea68b7 Add (int) case to Thrift version comparison
Summary: Deals with 32 bit machines doing a weird sign-bit thing here.

Reviewed By: dreiss

Test Plan: For 32 bit AmieStreet partners


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665356 13f79535-47bb-0310-9956-ffa450edef68
2007-11-20 02:06:47 +00:00
hzhao
b6014f494f added trunk
Reviewed By: shire
Test Plan: ape work


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665352 13f79535-47bb-0310-9956-ffa450edef68
2007-11-18 20:54:30 +00:00
hzhao
7fcc9e87ba tagging thrift-protocol-1.0.0
Reviewed By: shire
Test Plan: ape work


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665351 13f79535-47bb-0310-9956-ffa450edef68
2007-11-18 20:48:56 +00:00
Mark Slee
09f69e0524 Add __autoload() support to Thrift-generated PHP code
Summary: Include thrift/autoload.php and use -phpa flag to generated code that works with autoload. Good for services with lots of methods that are typically not all invoked.

Reviewed By: dreiss

Test Plan: Falcon, baby, falcon.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665349 13f79535-47bb-0310-9956-ffa450edef68
2007-11-17 00:32:36 +00:00
Mark Slee
f5a6b0c109 Fix PHP TBufferedTransport readAll() to work with TSocket timeouts
Reviewed By: lucas

Test Plan: Invoke Buffered Transport wrapped around socket


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665348 13f79535-47bb-0310-9956-ffa450edef68
2007-11-17 00:27:17 +00:00
dweatherford
611434992a [thrift] Fix extension deserialization call with no classname
Summary: The extension expects a classname as a string and does not allow null;
  use the empty string instead of null in the absence of a classname to pass.

Reviewed By: mcslee
Test Plan: php -l
Revert: svn


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665347 13f79535-47bb-0310-9956-ffa450edef68
2007-11-16 03:29:47 +00:00
David Reiss
465ccc0924 Thrift: Fix new-style generated PHP code.
Summary:
Fix reading of lists/sets of lists/sets/maps.

Reviewed By: mcslee

Test Plan: Tested in trunk.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665333 13f79535-47bb-0310-9956-ffa450edef68
2007-11-13 21:41:29 +00:00
Mark Slee
0cdc6c8cd9 Merging PHP transport changes from www trunk to thrift trunk
Summary: Some empty() fixes, plus a few other socket helpers

Reviewed By: lucas

Test Plan: Use the transports to make IPC calls!


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665331 13f79535-47bb-0310-9956-ffa450edef68
2007-11-13 10:19:08 +00:00
Mark Slee
2b786221ed Fixing typo in Thrift trunk
Summary: xter => xfer

Reviewed By: sgrimm


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665329 13f79535-47bb-0310-9956-ffa450edef68
2007-11-13 05:35:34 +00:00
Mark Slee
5b743079da Thrift PHP generation Redux
Summary: Chopping the amount of code generated by Thrift for PHP services by two orders of magnitude (approx 25% of the previous size). This is done via putting more logic in a dynamic base class and taking it out of the generated code. Hopefully this wins back the CPU cycles paid just to load code from APC at the cost of a marginal increase in dynamic execution runtime.

Reviewed By: sgrimm, dreiss

Test Plan: Ran all the tests in trunk/test/php, also tested the API generate code and Falcon, etc. in my sandbox


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665328 13f79535-47bb-0310-9956-ffa450edef68
2007-11-13 04:00:29 +00:00
lklots
ffc21fb792 [TMemoryBuffer: an in-memory buffer acting like a transport]
Summary: This is the php equivalent of the cpp TMemoryBuffer.
         It is simply a transport that stores read and fetches write
         requests to and from a string.

Trac Bug: #

Blame Rev:

Reviewed By: dreiss

Test Plan: Tested using thrift de/serialization. Wrote thrift objeccts
           to the buffer and then read them later to resconstruct them.
           Tested exceptional cases.

Revert Plan: ok

Database Impact: none

Memcache Impact: none

Other Notes:

EImportant:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665320 13f79535-47bb-0310-9956-ffa450edef68
2007-11-02 23:01:27 +00:00
hzhao
b000f7433d [thrift_protocol] need negative testing for default inclusion
Reviewed By: dweatherford
Test Plan: dev026 build


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665319 13f79535-47bb-0310-9956-ffa450edef68
2007-11-02 03:18:28 +00:00
dweatherford
f36e484cfb [thrift] return empty string instead of NULL
Summary: Turns out they're different, oops
Reviewed By: marcel
Test Plan: recompile, reinstall, synapse:tablet.get() on a nonexistent cell (which returns an empty string)
Revert: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665318 13f79535-47bb-0310-9956-ffa450edef68
2007-11-02 02:22:25 +00:00
boz
8ebe4a1757 THRIFT: update the thrift extension
Summary: more ZTS stuff

Reviewed By: hzhao

Test Plan: the same tests still pass


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665316 13f79535-47bb-0310-9956-ffa450edef68
2007-11-01 07:37:45 +00:00
dweatherford
80940b70e8 [thrift] Merge protocol/transport changes from tfb/www
Summary: Supporting the thrift_protocol extension.
  Relevant changesets are r66531, r66700, r66708
Reviewed By: mcslee
Test Plan: same code already runs in tfb trunk, php -l
Revert: svn


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665315 13f79535-47bb-0310-9956-ffa450edef68
2007-10-31 23:30:56 +00:00
dweatherford
51c0393620 [thrift] PHP thrift_protocol extension
Summary: Implement a deserializer for thrift integral types and containers
  in C++ for extra performance. To be combined with compiler support to
  generate code that uses the extension + TBinaryProtocolAccelerated to
  enable it.

Reviewed By: mcslee
Test Plan: runs fine in my sandbox...
Revert: svn


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665312 13f79535-47bb-0310-9956-ffa450edef68
2007-10-31 04:22:12 +00:00
David Reiss
6fc7be28bb Thrift: TNullTransport for PHP.
Summary:
We have this in C++.  Adding an implementation for PHP.

Reviewed By: mcslee

Test Plan:
Used it while testing web code.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665292 13f79535-47bb-0310-9956-ffa450edef68
2007-10-04 23:02:01 +00:00
Mark Slee
4d73d5c5cb Thrift: THttpClient for PHP in Thrift trunk
Reviewed By: peter

Test Plan: In SMC frontend


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665147 13f79535-47bb-0310-9956-ffa450edef68
2007-06-29 23:15:00 +00:00
Mark Slee
808454ec63 Thrift TBinaryProtocol change
Summary: New Thrift TBinaryProtocol with a version identifier

Reviewed By: aditya, eugene

Test Plan: Modify your services to have strictRead_ and strictWrite_ both set to FALSE. Then redeploy your services and test running clients against them. Once you have clients and servers running stably on this new code, you should redploy versions with strictWrite_ set to TRUE. Once that's all good, we can set strictRead_ to TRUE as well, and eventually deprecate the old protocol code entirely.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665138 13f79535-47bb-0310-9956-ffa450edef68
2007-06-20 21:51:57 +00:00
Mark Slee
13a0d4a3d6 PHP new build fix for TBinaryProtocol
Reviewed By: shire


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665079 13f79535-47bb-0310-9956-ffa450edef68
2007-04-03 03:16:11 +00:00
Mark Slee
a821cfd39f Missed an include line in sample code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665064 13f79535-47bb-0310-9956-ffa450edef68
2007-03-21 06:53:03 +00:00
Mark Slee
06af13d308 Readme on PHP/Apache Thrift integration
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665063 13f79535-47bb-0310-9956-ffa450edef68
2007-03-21 06:50:52 +00:00
Mark Slee
7679196f1c Various Thrift fixes, including Application Exception support in Ruby, better errror messages across languages, etc.
Reviewed By: thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665058 13f79535-47bb-0310-9956-ffa450edef68
2007-03-14 02:47:35 +00:00
Mark Slee
54b7ab9b53 READMEs and DOCs and ant tasks, oh my
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665048 13f79535-47bb-0310-9956-ffa450edef68
2007-03-06 00:06:27 +00:00
Mark Slee
5d06feab21 Thrift build cleanup stuff
Summary: Get rid of autoconf stuff for lib/php, it doesn't do anything


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665046 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 22:18:18 +00:00
Mark Slee
adde9687c6 Giving Marc K props for crazy bitshifting in PHP binary protocol
Reviewed By: marc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665036 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 00:37:56 +00:00
Mark Slee
4902c0563f Apply Thrift license to PHP source code
Reviewed By: php


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665033 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 00:31:30 +00:00
Mark Slee
57cc25e2a3 Some Thrift documentation cleanups
Summary: Getting ready to hand this over to powerset, just want to have the right licenses in place and such first.

Reviewed By: thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665029 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 21:43:54 +00:00
Mark Slee
0af62d181c Bogus $this->type in TApplicationException in PHP
Reviewed By: php


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665027 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 22:11:09 +00:00