THRIFT-6023: Add HTTP transport support to PHP cross-tests#3515
Draft
sveneld wants to merge 6 commits into
Draft
THRIFT-6023: Add HTTP transport support to PHP cross-tests#3515sveneld wants to merge 6 commits into
sveneld wants to merge 6 commits into
Conversation
Client: php PHP was excluded from the cross-test HTTP matrix while other languages (Python, Go, Node, C++, Java, Lua, Dart, JS, D, Haskell) already declare "http" in their cross-test transports and verify interop. Server: TestServer.php detects --transport=http and pcntl_exec()s into PHP's built-in web server (php -S 127.0.0.1:$port TestServer.php). The same script re-enters under SAPI cli-server, reads the Thrift request via TPhpStream from php://input, dispatches it through the existing processor, and writes the response to php://output. Original -d flags from the launcher cmdline are preserved so the accel/sockets extensions stay loaded. Client: TestClient.php gains an --transport=http branch using TPsrHttpClient (THRIFT-6010) against http://127.0.0.1:\$port/, with no buffered/framed wrapper since TPsrHttpClient buffers internally. tests.json: adds "http" to PHP server and client transports and raises the client timeout from 6s to 10s to absorb HTTP overhead. composer.json: adds guzzlehttp/guzzle ^7.8 to require-dev so the PSR-18 auto-discovery in TPsrHttpClient resolves at cross-test time. Generated-by: Claude Opus 4.7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds HTTP transport support to the PHP entry of the cross-test matrix. PHP was the only major-language entry stuck on
buffered/framedwhile Python, Go, Node, C++, Java, Lua, Dart, JS, D, and Haskell already declarehttpand verify HTTP interop.Server —
TestServer.phpdetects--transport=httpin CLI mode andpcntl_exec()s into PHP's built-in web server (php -S 127.0.0.1:$port TestServer.php). The same script re-enters under SAPIcli-server, reads the request viaTPhpStreamfromphp://input, dispatches it through the existing processor, and writes the response tophp://output. The original-dflags from the launcher cmdline (e.g.-dextension=thrift_protocol.so) are preserved by parsing/proc/self/cmdline, so the accel extension and sockets stay loaded under the spawned server too. The cross-runner'ssocket.connect_exreadiness probe works becausephp -STCP-binds the port immediately.Client —
TestClient.phpgains anif ($MODE == 'http')branch that usesTPsrHttpClient(added in THRIFT-6010) againsthttp://127.0.0.1:$port/.TPsrHttpClientbuffers internally, so noTBufferedTransport/TFramedTransportwrapping.tests.json — adds
"http"to PHP server and clienttransports; bumps clienttimeoutfrom 6s → 10s to absorb HTTP overhead.composer.json — adds
guzzlehttp/guzzle: ^7.8torequire-devso the PSR-18 auto-discovery inTPsrHttpClientresolves a concrete HTTP client at cross-test time.JIRA: THRIFT-6023. Draft until cross-test CI validates the new php↔php / php↔py3 / php↔go HTTP matrix cells.
[skip ci]anywhere in the commit message to free up build resources.