Skip to content

test(aot): fix 404 Status expectation and add REQUEST_METHOD PHPT#468

Merged
PurHur merged 1 commit into
masterfrom
aot/web-aot-coverage-404-request-method
May 22, 2026
Merged

test(aot): fix 404 Status expectation and add REQUEST_METHOD PHPT#468
PurHur merged 1 commit into
masterfrom
aot/web-aot-coverage-404-request-method

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 21, 2026

Summary

  • Align in_array_router_404.phpt with actual AOT http_response_code(404) output (Status: 404, matching http_response_code.phpt).
  • Add web_request_method.phpt to assert $_SERVER['REQUEST_METHOD'] after __superglobals__refresh at runtime.

Docker test output (php-compiler:22.04-dev)

php vendor/bin/phpunit --group aot-link --exclude-group serve
  • 124 tests, 677 assertions
  • Failures (pre-existing): 1 — coalesce_get_present.phpt ($_GET['name'] ?? 'Guest' prints empty; compile succeeds, run returns blank line)

Repro (coalesce — follow-up)

export PHP_COMPILER_LLVM_PATH=$PWD/.llvm LD_LIBRARY_PATH=$PWD/.llvm PATH=$PWD/.llvm:$PATH
code='<?php $n = $_GET["name"] ?? "Guest"; echo $n, "\n";'
echo "$code" | php bin/compile.php -q name=Ada -o /tmp/coalesce_bin -
QUERY_STRING=name=Ada /tmp/coalesce_bin   # expected: Ada, actual: (empty)

Test plan

  • ./script/docker-ci-local.sh --group aot-link --exclude-group serve (bind-mount via tar)
  • Full ./script/ci-local.sh before merge (blocked on coalesce fix unless we accept known failure)

Made with Cursor

Fix in_array_router_404 expectation to match http_response_code() output
(Status: 404). Add web_request_method.phpt for refreshed $_SERVER at AOT
runtime.

Known gap: coalesce_get_present.phpt still fails (empty output); see PR.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit ddecc39 into master May 22, 2026
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.

1 participant