php

  • Negative string offsets read from the end

    Reading the last character of a string has been $s[strlen($s) – 1] for two decades, which computes the length to throw it away and reads badly next to…

  • Static analysis on a codebase that has never had any

    Four thousand errors on the first run is a number nobody can act on. Starting at level 0, ignoring by pattern, and raising the floor one level at…

  • rest_prepare_post to reshape a response

    Removing a field from a core endpoint, or renaming one, has no registration API — the filter on the prepared response is the only hook, and it runs…

  • The asset pipeline Laravel 5.4 shipped

    Elixir wrapped gulp, which wrapped everything else. Mix wraps webpack directly — and leaves the configuration reachable when the abstraction runs out.

  • API resources replaced the transformer package

    Shaping a model for JSON has meant a transformer library or toArray() on the model, and the second couples the wire format to the database columns — so…

  • Telescope does not exist yet; here is the query log

    Finding out what queries a request actually ran means either a package, a debug bar that changes the page, or the listener that has been in the framework…

  • Composer 1.4 made the platform check a real error

    Installing a package requiring a PHP version newer than the one running used to be a warning in some paths. Composer 1.4 tightened it, which surfaces a problem…

  • with() eager loads now; load() does it afterwards

    Both solve the same N+1 problem and they apply at different moments, which decides whether the collection you already have can be fixed or has to be re-fetched.…

  • rest_api_init fires late, and registering early anyway

    rest_api_init only fires on a REST request, which is efficient and means anything registered there does not exist during a normal page load — including the route definitions…

  • The REST API in core, and the plugin it replaces

    4.7 shipped the content endpoints. What moving off the feature plugin involves, why authentication is still the unsolved half, and the read API every site now exposes.