How a PHP library of the MIDDAG ecosystem generates and publishes its reference documentation: class signatures, method parameters, return types and inheritance trees. What this hub publishes is in Documentation publication.
Tooling
| Language | Standard tool | Notes |
|---|---|---|
| PHP | phpDocumentor | Doctum and Sami are not supported. |
| JS/TS | TypeDoc | Parallel standard for JavaScript and TypeScript; not covered here. |
1. Set up phpDocumentor in the repository
- Add phpDocumentor to
composer.jsonas arequire-devdependency. - Create the configuration at
phpdoc.dist.xml, at the repository root. - Add a
make reference(orcomposer reference) target that runs phpDocumentor with that configuration.
2. Generate the docs locally
make reference
# or
composer referenceA local run is for checking the output only. The output is never committed: keep the output directory in .gitignore.
3. Publish on each release
CI/CD generates the reference on each release, from the released tag, and publishes it as a versioned xref payload through the MIDDAG docs proxy:
| Library | Bucket | Reaches this hub |
|---|---|---|
| OSS | middag-docs-public |
Yes: the @api surface. |
| Internal | middag-docs-private |
Only the types the hub publishes for that library; see Documentation publication. |
- There is no reference site per library: this hub aggregates the public payloads.
- The organization meta repository
github-privatenever hosts generated reference content.
4. Use the shared pipeline component
An OSS library publishes with the reusable workflow cloudflare-r2-reference-publish.yml of middag-io/actions, pinned to the cloudflare-r2-reference-publish-v1 tag. Read the component README before wiring it.
5. Read the published reference
The hub copies each declared xref channel to /api/{repo}/{segment}/, as the generator produced it. A library reaches it only when hub.config.json declares "xref" in its kinds.
| Library | API reference |
|---|---|
middag-php-wordpress |
Latest |
Out of scope
- TypeScript and JavaScript reference docs (TypeDoc).
- API specifications (OpenAPI, JSON Schema).
- End-user product documentation.