[PHP] Add TSRMLS_CC fallback defines for PHP versions above 7#3512
Merged
[PHP] Add TSRMLS_CC fallback defines for PHP versions above 7#3512
TSRMLS_CC fallback defines for PHP versions above 7#3512Conversation
6 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR restores compatibility across PHP 7+ builds by adding empty fallback definitions for legacy TSRMLS_CC macros introduced for PHP 5.x support.
Changes:
- Add empty
TSRMLS_CCfallback defines indns_polyfill.candpost_message_to_js.cwhen the macro is missing (PHP 7+). - Update the bundled Node asyncify PHP 8.4 build metadata from
8.4.19to8.4.20(WASM path/version/size and related generated offsets).
Reviewed changes
Copilot reviewed 4 out of 59 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/php-wasm/node-builds/8-4/asyncify/php_8_4.js | Bumps embedded PHP 8.4 runtime metadata/version and updates generated constants/offsets. |
| packages/php-wasm/compile/php-wasm-dns-polyfill/dns_polyfill.c | Adds TSRMLS_CC empty fallback for PHP 7+ compatibility. |
| packages/php-wasm/compile/php-post-message-to-js/post_message_to_js.c | Adds TSRMLS_CC empty fallback for PHP 7+ compatibility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5a7cc94 to
222d633
Compare
JanJakes
approved these changes
Apr 21, 2026
mho22
added a commit
that referenced
this pull request
Apr 21, 2026
This pull request is part of #3512 Compiling PHP.wasm Node and Web.
2ffda56 to
ef5eb71
Compare
mho22
added a commit
that referenced
this pull request
Apr 24, 2026
This pull request is part of #3512 Compiling PHP.wasm Node and Web. This is the second attempt since [the first one](#3513) was merged directly inside #3512 which hit the same issue as when you recompile PHP.wasm directly inside a PR. And it looks like even this is not possible. We will probably need to Compile Node and Web separately. <img width="830" height="764" alt="Capture d’écran 2026-04-22 à 15 16 22" src="https://github.com/user-attachments/assets/c7277772-4c05-4b36-8e66-5ae558b35a83" />
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.
Motivation for the change, related issues
Add PHP 5.2 WebAssembly builds and runtime support added
TSRMLS_CCmacros todns_polyfillandpost_message_to_jsfor PHP 5.x compatibility, but these macros don't exist in PHP 7+. This breaks recompilation of PHP.wasm for all PHP versions 7.0 through 8.5.Implementation details
Added empty
TSRMLS_CCfallback defines todns_polyfill.candpost_message_to_js.cTesting Instructions (or ideally a Blueprint)
nx run php-wasm-node:recompile-php:jspinx run php-wasm-node:recompile-php:asyncifynx run php-wasm-web:recompile-php:jspinx run php-wasm-web:recompile-php:asyncify