Archive

legacy-code

  • PHPStan level 6 on a codebase from 2014

    Two weeks of static analysis on a seven-year-old Symfony application: 417 errors at level 0, 8,996 at level 6, one nullable return that 611 passing tests never touched, and the rule about what may enter a baseline.

    Read it

  • PHP 7.1 in a codebase that still remembers 5.3

    PHP 7.1 shipped on 1 December. Nullable types and iterable let me delete guard clauses across 31 functions. ArgumentCountError cost a day and a rollback, and the mcrypt deprecation is a backfill, not a rename.

    Read it

  • jQuery 3 and the code we kept

    The admin is 40,000 lines of jQuery and we moved it to 3.1.1. What the Promises/A+ rewrite of Deferred actually broke, why fractional widths made a page slow, and why we are not rewriting.

    Read it

  • Composer and PSR-4 in a codebase built on require_once

    The ERP loads 181 files per request through require_once chains and an unmaintained PEAR install. How we moved it onto Composer: classmap for the old code, PSR-4 for new code, and the class that only broke on Linux.

    Read it