From 06f49d03737633024061324bb90ffccb915c9c97 Mon Sep 17 00:00:00 2001 From: beamologist Date: Wed, 21 Oct 2026 17:23:28 +0200 Subject: [PATCH] ci: check the README's PHP blocks against the package (codebase-checks#8) A reader who copies a PHP block out of the README gets code that parses and calls what this package has, and a block that stops doing so fails CI before it ships. The job calls the shared check pinned by full commit SHA; a doc change runs it, since this workflow has no paths-ignore. Packagist publishes by the tag alone, so there is no publish job to wait on it. The architecture diagram's fence now names what it is (`text`), which is what the sweep reads a fence for. Refs macula-codebase-checks#8 --- .github/workflows/ci.yml | 10 ++++++++++ README.md | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91a06d4..9c0be5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,3 +48,13 @@ jobs: - name: rebar3 as lint lint working-directory: scripts/cross-verify-macula run: rebar3 as lint lint + + # Every PHP block README.md publishes parses and type-checks against this + # package, and a doc change runs this (macula-codebase-checks#8). The pin is a + # full commit SHA. Packagist publishes by the tag alone, so there is no publish + # job here to wait on it. + docs: + name: docs (PHP snippets) + permissions: + contents: read + uses: macula-io/macula-ci-images/.github/workflows/doc-snippets-php.yml@d25a36c1b6ba7b8e72db17873aa7c2c7793eba70 diff --git a/README.md b/README.md index 1a78b4a..a3bd4d8 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ bytes, and come back as hex. ## Architecture -``` +```text src/ (PHP API) ── src/Binding.php (ext-ffi) ── libmacula (macula-go's C ABI) ── macula-go pool ```