Uncategorized

  • An effect that sets state it also depends on

    An effect listing a value in its dependencies and setting that value in its body is an infinite loop, and the analyser that suggested adding the dependency is…

  • new in initializers works for a parameter and not a property

    An object may be a default for a parameter, a static variable, a global constant and an attribute argument, and not for a property. The exclusion is a…

  • Freezing time, and the code that calls time() directly

    A test freezing the framework clock still fails against code calling time() or new DateTime(), because those bypass it entirely. The database clock is the one that catches…

  • Two-factor as a requirement, not an option

    Optional two-factor is adopted by the people who were already careful, which is not the population it was introduced for. The reset path is the security weak point…

  • blockGap, and the margin you stopped writing

    Vertical spacing between blocks moves from a stylesheet rule to a setting, which is a better mechanism and a large diff. Setting blockGap to false disables the control…

  • Claiming a message and doing the work in one transaction

    Recording that a message was handled and doing the work are two writes, and a crash between them is either a duplicate or a silent loss. Claiming outside…

  • index.html is the only required template

    A block theme needs style.css, templates/index.html and nothing else, which makes the minimum viable theme three files. The fallback to index.html is total rather than partial, so a…

  • A health check format agreed across two runtimes

    A load balancer, an orchestrator and a monitoring system each want a health endpoint, and two services answering differently is two integrations. Excluding third-party dependencies is the rule…

  • theme.json v2 renamed the keys you just learned

    Version 2 arrives with 5.9, six months after version 1, and moves several keys — a file written in 2021 needs migrating. The customTemplates and templateParts sections are…

  • A lock around a recomputation, and the requests that wait

    The simpler stampede fix is a lock, and it converts a burst of computation into a burst of waiting. Serving stale is nearly always the right branch and…