Problem
./phpc init --profile miniwebapp scaffolds from templates/init-miniwebapp/ (#632), but the canonical reference app is examples/003-MiniWebApp/. The trees have drifted (e.g. public/index.php, src/Router.php differ today).
New projects get an older skeleton; bugs fixed in the example do not reach phpc init users.
Goal
Treat examples/003-MiniWebApp as source of truth and keep templates/init-miniwebapp/ aligned (or generate the template from the example in CI).
Scope
Acceptance criteria
./script/check-init-miniwebapp-parity.sh # exit 0 when in sync
./script/ci-fast.sh
After phpc init --profile miniwebapp /tmp/mw && ./phpc lint --all /tmp/mw, lint matches example capabilities (PATH_INFO, REQUEST_METHOD, templates).
Verification (local / Docker only)
./phpc init --profile miniwebapp /tmp/mw-test
./phpc lint --all /tmp/mw-test
./script/check-init-miniwebapp-parity.sh
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev ./script/ci-fast.sh
Dependencies
Non-goals
- Auto-sync on every commit without an explicit check (silent drift)
- Changing example routes without updating init template in the same PR
Links
Problem
./phpc init --profile miniwebappscaffolds fromtemplates/init-miniwebapp/(#632), but the canonical reference app isexamples/003-MiniWebApp/. The trees have drifted (e.g.public/index.php,src/Router.phpdiffer today).New projects get an older skeleton; bugs fixed in the example do not reach
phpc initusers.Goal
Treat
examples/003-MiniWebAppas source of truth and keeptemplates/init-miniwebapp/aligned (or generate the template from the example in CI).Scope
templates/init-miniwebapp/README.mdandexamples/003-MiniWebApp/README.mdscript/check-init-miniwebapp-parity.sh(diff key files:public/index.php,src/Router.php,phpc.json,config.php, template partials)./script/ci-fast.shorExamplesManifestTest(fast, no LLVM)Acceptance criteria
./script/check-init-miniwebapp-parity.sh # exit 0 when in sync ./script/ci-fast.shAfter
phpc init --profile miniwebapp /tmp/mw && ./phpc lint --all /tmp/mw, lint matches example capabilities (PATH_INFO,REQUEST_METHOD, templates).Verification (local / Docker only)
./phpc init --profile miniwebapp /tmp/mw-test ./phpc lint --all /tmp/mw-test ./script/check-init-miniwebapp-parity.sh docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev ./script/ci-fast.shDependencies
Non-goals
Links
templates/init-miniwebapp/examples/003-MiniWebApp/lib/Cli/PhpcInit.php