linting

  • assertContains split, and why a blind rename is wrong

    The old function accepted an array or a string and the two behaviours have been separated, so a search and replace is wrong in one direction or the…

  • A quoted heredoc delimiter expands nothing

    A heredoc expands variables and command substitutions by default, which is convenient for a template and disastrous for anything containing a dollar sign belonging to another language. One…

  • Lazy loading arrived in the browser

    One attribute replaces an IntersectionObserver and a library — and applying it to everything makes the Largest Contentful Paint worse rather than better.

  • An architecture test that asserts on namespaces

    A layering rule that exists only in a diagram is a rule that has already been broken, and asserting on it is a test like any other. Fifteen…

  • Contract tests that live in the repository

    The collection lived in one person’s account, which is not version control. An endpoint changed and the client team found out from an error.

  • Moving a pipeline to a runner you do not own

    The CI server was a pet and the pipeline was a shell script nobody could read. A runner that assumes nothing is the point, and the cache is…

  • PHPUnit 9 and the assertions that finally went

    What 8 deprecated, 9 removes, and the deadline was a year. Rector does the renames; the one it cannot decide is the one that changed behaviour.

  • An API document that is generated, not maintained

    The documentation was written in January and the API changed in March. Documentation written by hand is a copy, and copies drift — usually within a sprint.

  • Blade components and the partial that had eleven parameters

    An @include with eleven variables and no way to know which are required. A partial is a file rather than a contract, and 7.0 makes the constructor the…

  • as const, and the literal type it preserves

    An object literal widens to its general types, so a configuration object loses exactly the information that would have made it useful. The last two lines are the…