Skip to content

Testing: 005-SessionsWeb in examples-web-smoke + ExamplesCompileTest #1887

Description

@PurHur

Problem

Shipped examples 000–004 are covered by make web-smoke, make examples-web-smoke, and test/unit/ExamplesCompileTest.php. #1881 adds 005-SessionsWeb (session + flash) but nothing in CI curls POST/login/logout or lint-smoke-runs the new tree — regressions would only show up in ad-hoc phpc serve.

Goal

When #1881 VM routes are green, add default-on (or opt-in → default-on) gates:

  1. ExamplesCompileTest — lint + VM smoke for examples/005-SessionsWeb/public/index.php (session cookie round-trip)
  2. script/examples-web-smoke.sh — curl login → flash redirect → logout (VM phpc serve)
  3. Optional: make examples-sessions-smoke wrapper in Makefile (mirror examples-web-smoke)

Implementation hints

Piece Path Notes
Env script/ci-defaults.env SESSIONS_WEB_SMOKE_GATE="${SESSIONS_WEB_SMOKE_GATE:-0}" → flip :-1 when green
Fast CI script/ci-fast.sh Hook after 001–004 web smoke (#298)
Full CI script/ci-local.sh Same gate in serve phase
Helpers test/support/ Reuse MiniWebAppCgiEnv-style cookie jar for curl
Docs examples/README.md Run matrix row for 005

AOT link/execute for 005 stays opt-in until #1882 / project JIT stable — do not block VM smoke on LLVM.

Acceptance criteria

SESSIONS_WEB_SMOKE_GATE=1 ./script/ci-fast.sh
SESSIONS_WEB_SMOKE_GATE=1 make examples-web-smoke   # includes 005 curls
vendor/bin/phpunit --filter ExamplesCompileTest
  • Failing session route fails gate with actionable stderr
  • examples/README.md documents gate env var

Verification (local / Docker only)

docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  SESSIONS_WEB_SMOKE_GATE=1 ./script/ci-fast.sh

Dependencies

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions