Skip to content

DevEx: phpc.json schema and phpc validate-manifest (fixes #263)#390

Merged
PurHur merged 1 commit into
masterfrom
issue-263-phpc-json-validate-manifest
May 20, 2026
Merged

DevEx: phpc.json schema and phpc validate-manifest (fixes #263)#390
PurHur merged 1 commit into
masterfrom
issue-263-phpc-json-validate-manifest

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 20, 2026

Summary

  • Add docs/phpc-json.schema.json describing binary, optional public, and stub fields (entry, includes, autoload.psr-4, index).
  • Implement PHPCompiler\Web\ManifestValidator and phpc validate-manifest [dir] with actionable stderr messages.
  • phpc doctor reports a non-blocking warning when phpc.json exists at the repo root and fails validation.

Test plan

  • vendor/bin/phpunit --filter ProjectManifestTest (6 tests) in php-compiler:22.04-dev
  • ./script/docker-ci-local.sh --filter ProjectManifestTest
  • Acceptance: echo '{"binary":"missing"}' > /tmp/phpc.json && phpc validate-manifest /tmp → exit 1, binary path not found

Closes #263

Made with Cursor

Machine-readable schema, ManifestValidator, and phpc validate-manifest catch
unknown keys and missing binary paths before serve/build; phpc doctor warns
when a repo-root manifest is invalid.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 265ca3b into master May 20, 2026
@PurHur PurHur deleted the issue-263-phpc-json-validate-manifest branch May 20, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DevEx: phpc.json JSON Schema and phpc validate-manifest

1 participant