Skip to content

v0.1.0 — the foundation, laid

Latest

Choose a tag to compare

@ericmann ericmann released this 23 Sep 22:32
· 1 commit to main since this release
7222965

v0.1.0 — the foundation, laid

It was not built in a day, though a day was all it took, and the man who had watched a hundred plugins rise up out of nothing and settle back into nothing, each one carrying in its bones the same mistakes as the last, the option read in eleven places and the hook fired from wherever the hand happened to be resting, sat down at last and said, not aloud, not to anyone, that there would be one place for every name and one place for every clock and that the reviewer, when the reviewer came, would not have to form an opinion but only to grep.

And so there is a Plugin which builds the others and a Keys which names them, and a Flags which alone may ask the database what is true, and a Hooks which alone may tell the world, and a Clock which is handed down like a pocket watch so that no test ever again waits on the actual turning of the earth; and there is the exception, NotImplementedException, which is the honest word for the thing not yet done, thrown with __METHOD__ so that the not-done announces itself by name.

There is wp <slug> doctor, which will tell you what is wrong before you have to find out, and there is wp-env, which stands the whole thing up in a container with one command and tears it down with another, and a PHPUnit suite split in two, the half that needs no WordPress and the half that does, and phpcs holding to the VIP standard and PHPStan holding to level six with no baseline to hide behind, and a script called test-map that will not let a class exist without its test.

And there is Foundry, waiting: a docs/SPEC.md in the shape the planner reads, and docs/foundry.base.json with the roles already routed and thirteen constraints that test themselves against their own fixtures before they test anyone else, so that a rule which stops catching what it was meant to catch fails loudly and not in silence three review rounds later.

The foundation carries its maker's marks, quietly, as the old houses did: a humans.txt served from the plugin root, a lineage row at the bottom of doctor, a --eam-epoch on :root, an /eam route in the REST index, an @author in every file, and a number, 437184000, which is the ninth of November 1983 and which no one else will ever have reason to type. None of it phones home. It only remembers.

Run bin/init.sh once and it will forget its own name and take yours, and keep the rest.

Requires PHP 8.1, WordPress 6.5, Composer, Node, Docker for the integration suite.

Verified at tag: phpcs, PHPStan 6, test-map, 20 unit tests on the host, 43 tests inside wp-env, doctor exit 0, every constraint fixture green with zero hits.