Skip to content

DevEx: phpc init --profile fileupload scaffold (006-FileUploadWeb parity) #2004

@PurHur

Description

@PurHur

Problem

#632 / #1886 / #2000 established phpc init profiles for miniwebapp, sessionsweb, and apijson with template parity checkers (#695, #1902). #1999 adds examples/006-FileUploadWeb/ but contributors cannot scaffold the same tree via CLI.

Goal

./phpc init --profile fileupload my-upload
./phpc lint my-upload/example.php
./phpc serve 127.0.0.1:8080 my-upload
curl -s -F 'doc=@README.md' http://127.0.0.1:8080/example.php

Produces a tree byte-synced to examples/006-FileUploadWeb/ once that example lands.

Scope

Piece Path
Template templates/init-fileupload/ from examples/006-FileUploadWeb/
CLI lib/Cli/PhpcInit.phpPROFILE_FILEUPLOAD = 'fileupload'
Parity checker script/check-init-fileupload-parity.sh + FILEUPLOAD_INIT_PARITY_GATE=1 in ci-fast (default 0 until template lands)
Test test/unit/PhpcInitFileUploadTest.php (mirror PhpcInitSessionsWebTest.php)
Docs docs/phpc-json.md, examples/README.md, ./phpc init --help

Acceptance criteria

./script/ci-fast.sh --filter PhpcInitFileUpload
php script/check-init-fileupload-parity.sh

Verification (local / Docker only)

docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  vendor/bin/phpunit --filter PhpcInitFileUpload

No GitHub Actions.

Dependencies

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions