refactoring

  • PHPUnit 12, and the tests we deleted instead

    A two-hour upgrade, and a directory of 188 tests excluded from every tool since 2023 and running on every push.

  • An API versioned for the first time in six years

    Six years of additive-only changes, and a change that cannot be additive. A field whose meaning must change, with four consumers reading it.

  • Tailwind 4, and the stylesheet we had already written

    4.0 in January, a CSS-first configuration, and a genuine reason to look again at a decision that had been made three times.

  • The shell script that was rewritten and stayed shell

    A six-hundred-line deploy script rewritten in a compiled language in 2024, and a second rewrite back to shell. The rewrite was correct about the problem and wrong about…

  • The snapshot I approved without reading

    A snapshot test that failed, an approval taken on the basis that the change was intentional, and a diff nobody opened. A snapshot test moves the verification from…

  • The stylesheet that was 2,100 lines and stayed

    A hand-written design system, evaluated against a framework, and kept for a reason that is not technical. The utility layer is genuinely better in a framework and it…

  • The seam that made a rewrite possible without one

    An interface introduced in 2022 for testing, which turned out to be the only reason a subsystem could be replaced in a fortnight. A comparing implementation running both…

  • The trait I replaced with a constructor argument

    A trait providing a logger to eleven classes, each of which called a static accessor to get one. The trait was hiding a service locator behind a method…

  • array_find, array_any and array_all

    Four array functions that every project had written as helpers, finally in the language. array_any short-circuits, which is the difference from array_filter followed by a count and matters…

  • Property hooks, and the getter that was a habit

    8.4 on 21 November, and a property can have a getter without being a method. 412 getters that return a property unchanged.