Uncategorized

  • A drop-in is not a plugin, and object-cache.php is one

    A drop-in is a file with a fixed name in wp-content that WordPress loads if it exists, and it cannot be activated, deactivated or updated by anything. object-cache.php…

  • The maintenance mode secret, and the bypass cookie

    Putting a site into maintenance mode used to lock out the people deploying it as well, so the usual workaround was an IP allowlist that had to be…

  • A recursive CTE needs a depth guard

    A cycle in the data — a category set as its own ancestor through the admin — recurses until the server stops it with an error, and the…

  • Composite actions, before reusable workflows existed

    Five workflows repeating the same eight setup steps is five places to update, and reusable workflows do not exist yet — a composite action is what does. shell:…

  • Blade components are classes, and the constructor is the contract

    An @include takes an array of variables with no declaration anywhere of which are required, which type they are, or what happens when one is missing. The constructor…

  • Redaction belongs in the pipeline, not the application

    Removing personal data at the call site catches what you thought about; removing it at the shipper catches the debug line somebody adds next year. The regular expression…

  • A CastsAttributes class replaces the accessor pair

    Casting a column to a value object needed an accessor and a mutator on every model that had one, and the pair had to be kept in step…

  • useMemo is a hint, not a guarantee

    The documentation says React may discard memoised values to free memory, and code that treats useMemo as a cache with a guarantee is relying on something that is…

  • The PHPStan baseline is a debt register

    A generated file recording every existing error is the thing that makes static analysis adoptable on a codebase that has never had any. Reading it once by directory…

  • Failing on a growing baseline is the whole ratchet

    A baseline that can grow is a suppression file, and one that can only shrink is a debt that gets paid — the difference is one CI step.…