php

  • A PSR-18 decorator ordering that was documented and still got reversed

    A comment explaining why each layer is where it is, and a fifth layer inserted in the wrong place anyway. A comment describing an order is read by…

  • The command that became a method call

    Eighty-eight commands with one handler each, dispatched through four frames of indirection. A command bus provides cross-cutting concerns and eighty-eight one-to-one mappings provide indirection. The transaction middleware moved…

  • The command bus we removed

    A command bus introduced in 2021, and 88 commands with one handler each. A stack trace with four frames of dispatch before the work.

  • Block bindings for a field that used to be a shortcode

    A shortcode from 2016 rendering a meta field, replaced by a binding on a core paragraph. The meta key must be registered with show_in_rest and a sanitisation callback…

  • Equality on a type where identity was ambiguous

    A value object where two instances with the same fields might or might not be the same thing, and five years of nobody deciding. The ambiguity is in…

  • Deleting a module

    A module built in 2022 for a product line discontinued in 2024. Eight thousand lines, a database schema and two scheduled jobs, all still running.

  • The exception I stopped catching

    A catch block added in 2021 for an error that has not occurred since, swallowing a different one. A catch of Throwable is a decision that every possible…

  • Mutation testing on a third directory, and a worse score

    A technique applied to a third directory, with a score of thirty-eight per cent and a good reason. A low score on code whose correctness is asserted at…

  • PSR-3 context, and the field that was finally queried

    A structured logging field added in 2023, never queried, and the one week it was the only thing that helped. A field with no queries against it for…

  • The value object library, five years on

    32 value objects in 2021, 41 now, and a retrospective on which of them earned their place. No symptom — a deliberate look.