php

  • An analyser rule for hooks that reach outside the object

    A convention that had been enforced by review, expressed as a rule after review failed twice. The rule is crude — it forbids calling anything on a collaborator,…

  • A hook that did a query, in a loop, invisible

    A property hook written by me, against a rule written by me, fourteen months later. The rule from December 2024 was pure, cheap and total, and the first…

  • Composer’s audit as the only gate that has ever failed

    Four merge gates on the pipeline, and after a year one of them has ever blocked anything. A gate that fails on your own change is feedback and…

  • PHP 8.1 reaches end of life, and the one host still on it

    December, the end of security support for 8.1, and a host running it that nothing in the deployment inventory knew about. The end-of-life date is not the story…

  • A plugin whose configuration is a filter

    Configuration as code, for a plugin that will never be distributed, and the test that covers it. Testing a filter is testing the contract rather than the implementation,…

  • Reviewing code I did not write

    Review as the skill that matters, and a volume of code that needs it. A change that looks right, passes, and is subtly wrong.

  • A plugin with no admin screen

    A plugin whose entire configuration is a constant and a filter, on a site whose deployment is a pipeline.

  • PSR-7 immutability, and the request I mutated by accident

    A with method whose return value was discarded, which is the one mistake PSR-7 makes easy. An immutable interface with fluent setters produces exactly this, and the discarded…

  • A lazy object for a client that is rarely used

    8.4 lazy objects, applied to a service whose constructor opens a connection and which fires on 3% of requests. This replaces a hand-written proxy class that existed only…

  • PSR-18 middleware, and the order that matters

    Four decorators around an HTTP client, composed in an order that is obvious once and unrecoverable afterwards. Signing inside retry is mandatory — a retried request needs a…