Skip to content

Testing: ServeAotTest MiniWebApp PATH_INFO routes and /assets/style.css (blocked #568) #610

@PurHur

Description

@PurHur

Problem

#478 tracks HTTP phpc serve --aot for examples/003-MiniWebApp routes. #277 ✅ added static CSS coverage for 001-SimpleWeb in ServeAotTest, but the north-star app has no PHPUnit gate that:

  1. phpc build --project examples/003-MiniWebApp
  2. phpc serve --aot 127.0.0.1:<port> examples/003-MiniWebApp
  3. Curls PATH_INFO routes (Web: Migrate 003-MiniWebApp from ?route= to PATH_INFO URLs #489) and GET /assets/style.css (Web: phpc.json assets directory served beside public docroot (003-MiniWebApp /assets/) #594 ✅)

Shell smoke (make examples-web-smoke) covers VM + curls; AOT HTTP regressions would only show up manually.

Goal

Extend test/real/ServeAotTest.php (or MiniWebAppServeAotTest.php) with @group miniwebapp + @group serve + @group llvm:

Request Assert
GET /index.php/hello?name=Dev Hello Dev
POST /index.php/contact Thank you
GET /index.php/api/status "ok":true
GET /assets/style.css 200, body contains body {

Skip with link to #568 / #58 until phpc build --project links; retarget skips from closed #67#539 / #568.

Acceptance criteria

./script/ci-local.sh --filter 'ServeAotTest.*MiniWeb'
# Harness:
./script/docker-ci-local.sh --filter 'ServeAotTest.*MiniWeb'

Respect PHP_COMPILER_SKIP_SERVE_TESTS when loopback bind fails (same as existing ServeAotTest).

No GitHub Actions.

Implementation hints

Step Files Notes
Build helper reuse ExamplesCompileTest project build argv phpc build --project
Serve bin/serve.php / PhpcCli --aot docroot = manifest public
Assets #594 DevServer::resolveAssetsFile must work in AOT serve path
PATH_INFO set SCRIPT_NAME, PATH_INFO in curl URL mirror #470 VM tests

Dependencies

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:webWeb / CGI / superglobalsenhancementNew feature or requestphase-5:reference-appPhase 5 – reference web application

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions