Skip to content

Testing: JIT smoke for phpc build --project on 003-MiniWebApp #587

@PurHur

Description

@PurHur

Problem

#58 / #145 track OOP in compliance PHPTs; #207 tracks phpc serve --jit. There is no CI signal that the full MiniWebApp project graph (phpc.json + includes[] + public/index.php) compiles under JIT after OOP lands — only flat examples/*/example.php JIT paths.

Contributors can fix Router::dispatch in VM while JIT still throws not jittable for ClassMethod or project link fails silently until someone runs bin/jit.php manually.

Goal

test/unit/MiniWebAppJitProjectTest.php with @group llvm:

  1. Skip when LlvmToolchain::isReady() is false (same probe as ExamplesCompileTest).
  2. Run project JIT entry documented in examples/003-MiniWebApp/README.md (e.g. php bin/jit.php public/index.php with QUERY_STRING=route=home or phpc build --project --jit when CLI flag exists).
  3. Exit 0 and stdout contains MiniWebApp needle (home route).
  4. While blocked: markTestSkipped linking Language: Class methods and property access in JIT #58 / Language: JIT include/require compile-time lowering (#54 follow-up) #475 / AOT: Native user-class object model for phpc build --project #568 — not Reference app: examples/003-MiniWebApp (router, templates, forms) #67 (closed).

Implementation hints

Piece File Notes
Test class test/unit/MiniWebAppJitProjectTest.php Copy skip/llvm pattern from ExamplesCompileTest
Env QUERY_STRING=route=home or PATH_INFO env keys from DevServer Mirror MiniWebAppVmCliTest
CI script/ci-local.sh llvm group Runs with full gate; optional MINIWEBAPP_JIT_PROJECT_GATE=1 if slow
Guard script/check-jit-compliance-ran.php #98 / #250 — JIT must not 100% skip when LLVM present

Unblock order

  1. Language: JIT include/require compile-time lowering (#54 follow-up) #475 — JIT include lowering for Router.php / templates
  2. Language: Class methods and property access in JIT #58 / Language: Visibility, constructors, and destructors #145 — method calls (if JIT still throws on ClassMethod)
  3. JIT: Per-run superglobal refresh for bin/jit.php (-q/-p between invocations) #642 — per-run superglobal refresh for multi-request JIT CLI

Native AOT project link remains #568 / #454 — out of scope here.

Acceptance criteria

./script/ci-local.sh --filter MiniWebAppJitProjectTest

Harness:

./script/docker-ci-local.sh --filter MiniWebAppJitProjectTest

Dependencies

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-3:aotPhase 3 – AOT deployment

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions