Uncategorized

  • First-class callable syntax in an array_map that reads better

    The syntax has been available since 8.1 and I had been using it only for named functions, which misses most of what it is for. The array callable…

  • The .dockerignore that halved the build context

    A 420 MB build context on a repository that is 60 MB, because .git, node_modules and four years of local uploads were all being sent to the daemon.…

  • The factory that took a DTO and returned another DTO

    A class named OrderFactory whose only method mapped one flat structure onto another flat structure with different field names. The name mattered more than it should have: three…

  • The shared kernel that became a dumping ground

    A Shared namespace created for three value objects, containing 140 classes four years later. A shared kernel needs an admission rule or it becomes the place things go…

  • A composite action for the four steps we copy everywhere

    Checkout, set up PHP, restore the Composer cache, install — repeated in nine jobs across four workflows, with three of them a version behind. The shell key on…

  • The container that ran as root because of one chown

    A Dockerfile that switched to a non-root user, then switched back for one directory permission and never switched forward again. The line that switched to root was correct…

  • A dev server proxy instead of CORS in development

    Adding permissive CORS headers so a dev server on 5173 can reach an API on 8080 means the development configuration differs from production in a security-relevant way. The…

  • Error cause, and the stack you stopped losing

    Wrapping an error in a more meaningful one used to discard the original, or required a non-standard property that nothing displayed. The tracker support lagging is the practical…

  • DNF types, and the signature that needed parentheses

    8.1 gave pure intersection types and no way to make one nullable; 8.2 allows a union of intersections, which covers the case everybody hit first. The name describes…

  • readonly class rejects an untyped property outright

    A readonly property must have a type, so a readonly class containing an untyped property is a compile error rather than a silently ignored one. The type requirement…