Skip to content

Commit the generated symbology gallery - #238

Merged
s2x merged 1 commit into
v2from
feature/examples-gallery-committed
Sep 3, 2026
Merged

Commit the generated symbology gallery#238
s2x merged 1 commit into
v2from
feature/examples-gallery-committed

Conversation

@s2x

@s2x s2x commented Sep 3, 2026

Copy link
Copy Markdown
Member

What

Follow-up to #236: the gallery pages are now committed rather than gitignored, so someone browsing the repository sees every supported QR/barcode rendered by every renderer without running anything.

  • examples/index.md, examples/codes/*.md (30 pages) and examples/assets/ (~2.3 MB) are checked in
  • ExamplesTest::testTheCommittedGalleryIsCurrent runs the generator on every build and fails on any diff against the committed files — a symbology added to Defaults (or a renderer whose output changes) turns the build red until the gallery is regenerated and committed, so a committed page cannot quietly outlive the library it describes
  • .gitignore entries removed; examples/README.md, gallery.php docblock and the CHANGELOG entry updated to match

Why

A gallery that only exists on a contributor's machine answers the "what does it draw" question for exactly one person. Committing it answers it for everyone — provided it cannot go stale silently, which is what the freshness test is for.

Verification

  • vendor/bin/phpunit tests/ExamplesTest.php — 5 tests, 283 assertions, OK (including the freshness test, which failed before the files were committed and passes after)
  • composer lint — clean (php-cs-fixer, PHPStan, Rector, kb-lint)
  • Sanity-checked the guard: modifying a committed page and running the test regenerates it and compares against the generator's output

@s2x
s2x merged commit 5ea6ff7 into v2 Sep 3, 2026
5 checks passed
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.

1 participant