v0.0.51

6 July 2026

FieldTypeHttp for live API field values, image effects (invert, blur, brightness, contrast, gamma, pixelate, sharpen), item lifecycle hooks, and HTTP/2 curl fix.

Added

  • FieldTypeHttp : fieldtype that fetches JSON from a REST API and exposes it for use in templates. Configured via four companion global fields: http_connector (named config.api.connectors entry or empty for absolute URL), http_url (path or absolute URL), http_query (query params, supports {uuid} and {view} placeholder substitution), http_headers (request headers). decode() returns the parsed JSON; response() gives the raw HttpResponse; ok() checks the status. Never indexed in search.
  • Image effects: invert, blur, brightness, contrast, gamma, pixelate, sharpen can now be passed in PageImage::src()/transform() option strings alongside w, h, fit, and grayscale. The variant hash is now derived from the raw option string rather than a serialized array.
  • Global fields http_connector, http_url, http_query, http_headers added to phlat/fields/ for use by FieldTypeHttp.

Changed

  • Http curl header callback: returns strlen($line) (the raw line length including CRLF) instead of strlen($line) + 2, fixing a double-count that caused HTTP/2 responses to stall.
  • PageFiles::meta() : created falls back to the file's mtime only when the file actually exists; previously would error on a missing file.