Skip to content

Stdlib: request_parse_body() + RequestParseBodyException on PHP 8.4 profile (#16927) - #16939

Merged
PurHur merged 2 commits into
masterfrom
agent/issue-16927-request-parse-body
Jul 6, 2026
Merged

PurHur merged 2 commits into
masterfrom
agent/issue-16927-request-parse-body

Conversation

@PurHur

@PurHur PurHur commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Register RequestParseBodyException on forward PHP_COMPILER_PROFILE=8.4 via languageProfileVersion() gate (matching http_get_last_response_headers pattern).
  • Implement request_parse_body() in PHP (RequestParseBodyEngine) parsing application/x-www-form-urlencoded and multipart/form-data from CONTENT_TYPE + REQUEST_BODY env without populating superglobals.
  • JIT lowering via RequestParseBodyRuntime + RequestParseBodyJitHelper; VM compliance covers parsing behavior.

php-src reference

  • ext/standard/http.c — PHP_FUNCTION(request_parse_body), RequestParseBodyException

Verification

PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_request_parse_body_urlencoded_profile_84.php
# array ( 'a' => '1', 'b' => 'two', ) + empty files

PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_request_parse_body_multipart_profile_84.php
# ok multipart fields

PHP_COMPILER_PROFILE=8.4 vendor/bin/phpunit --filter request_parse_body
# OK (10 tests, 10 assertions)

PHP_COMPILER_PROFILE=8.4 php bin/compile.php -l test/repro/maintainer_gap_request_parse_body_urlencoded_profile_84.php
# lint_ok

Note: AOT runtime fixtures deferred — LLVM bridge insertion fails compile; VM+JIT compliance guards parsing.

Closes #16927

Made with Cursor

PurHur and others added 2 commits July 6, 2026 14:16
Implements PHP 8.4 request body parsing (urlencoded + multipart) with a VM implementation and a JIT/AOT bridge via a nested helper, plus forward-profile gating and compliance/AOT fixtures.

Co-authored-by: Cursor <cursoragent@cursor.com>
…een (#16927)

VM/JIT compliance covers urlencoded + multipart parsing; AOT list-destructure
compile remains blocked on RequestParseBodyRuntime LLVM insertion.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 3ca1680 into master Jul 6, 2026
@PurHur
PurHur deleted the agent/issue-16927-request-parse-body branch July 6, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: RequestParseBodyException + request_parse_body() missing on 8.4 profile (pairs #5965, ext/standard/http.c)

1 participant