Uncategorized

  • REST API schema is not documentation, it is validation

    The schema attached to a route looks like a description for humans. Core uses it to validate and sanitise the request before the callback runs, which means an…

  • Laravel 5.4 dropped the model events you were using

    5.4 removed the string-based model events fired through the event dispatcher — eloquent.saved: AppOrder and its relatives — in favour of an $dispatchesEvents map to real classes. The…

  • composer install –no-scripts on a machine you do not trust

    Composer runs scripts declared by packages during install, which is convenient and means composer install executes third-party code the moment it lands. On a CI runner building a…

  • await in a loop is sequential, and usually wrong

    await inside a loop does exactly what it says: waits for each iteration before starting the next. For ten independent requests that is ten round trips one after…

  • Signed numeric strings compare differently now

    PHP 7.1 changed how a string with a leading sign is treated in a numeric context, which is a correctness fix and a behaviour change in code that…

  • Structured logs are the whole decision

    A log line written as a sentence has to be parsed back into fields by a regular expression somebody maintains, and that expression breaks whenever the sentence changes.…

  • webpack 2 tree shaking needs ES modules all the way down

    Tree shaking is presented as a webpack 2 feature and is really a property of ES modules: the imports have to be statically analysable, which means Babel must…

  • Alert on symptoms, dashboard the causes

    Alerting on every cause — disk, memory, queue depth, replica lag, a failed cron — produces an alert per cause and a channel nobody reads. Alerting on what…

  • get_id() rather than ->id, and why it matters

    The getter looks like ceremony over a property and is the entire point of the release: with the read going through a method, where the value comes from…

  • Certificate expiry monitored from outside

    A check that reads the certificate file on disk confirms the file is valid. It says nothing about what the server is actually serving, which may be a…