refactoring

  • A shell script that should have been a program

    A deployment script that had grown to six hundred lines of bash with functions, associative arrays and a retry loop. Bash is the right tool for orchestrating commands…

  • Sampling a generated diff, and what sample size means

    An automated refactor across four hundred files, and a review that cannot read eight thousand lines. Splitting the run by rule and reviewing each separately is what makes…

  • A design token pipeline that outlived its designer

    A token pipeline built in 2022 and the person who understood it has left. A colour change that took three days and touched five files.

  • A framework upgrade that was mostly deleting

    Laravel 11 in March, a skeleton with four fewer directories, and an application still carrying 2019’s structure.

  • The #[Override] that caught a library rename

    A minor version of a library renamed a protected hook method, and the attribute turned a silent behaviour change into a fatal error at load. Calling it internal…

  • PHPUnit 11, and the annotations that are finally gone

    The 10.0 migration did the work; 11.0 removes what 10 deprecated, which makes it a two-hour upgrade. A major that only removes previously deprecated behaviour is the cheap…

  • PHPUnit 11, and a suite that had already been migrated

    11.0 in February, a year after the 10.0 migration did the hard part, and eleven deprecations that were all things 10 had warned about.

  • removed blocks, and forgetting a resource on purpose

    Taking a resource out of management used to mean state rm, which is a command run against state and invisible in review. The default being destroy is the…

  • The migration Rector wrote and we rewrote

    An automated refactor across 412 files, a diff of 8,000 lines, and three wrong hunks in it. The review nobody could actually do.

  • The dependency we vendored

    A 200-line package with 41 transitive dependencies, doing one thing, and an advisory in something four levels down that we had never heard of.