Skip to content

Testing: ServeAotTest PATH_INFO front-controller with phpc serve --aot #453

@PurHur

Description

@PurHur

Problem

#276 (closed) added VM ServeTest coverage for /index.php/helloPATH_INFO=/hello via bin/serve.php.

test/real/ServeAotTest.php has no PATH_INFO case for phpc serve --aot. Front-controller routing for compiled binaries (#210, #67) can regress in bin/serve-aot.php env mapping without failing CI.

Goal

Mirror #276 under AOT serve:

  1. Build a minimal fixture (or reuse inline docroot) with public/index.php reading $_SERVER['PATH_INFO']
  2. phpc serve --aot 127.0.0.1:<port> <project>
  3. GET /index.php/hello200 + body contains expected route output
  4. Assert SCRIPT_NAME / PATH_INFO in response or via debug header (same assertions as VM test)

Scope

  • Extend ServeAotTest or add ServeAotPathInfoTest.php
  • @group llvm + @group serve
  • Skip when PHP_COMPILER_SKIP_SERVE_TESTS=1 or loopback bind fails

Acceptance criteria

make docker-build-22
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  ./script/ci-local.sh --filter ServeAotTest

includes PATH_INFO case when serve tests run.

Verification (local / Docker only)

No .github/workflows/* changes.

Dependencies

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions