The headline of 3.3 is CSRF protection that the browser handles for you β no token, no cookie, no server-side state, and it holds even against XSS. On top of that, the confusing {formContext} / {formContainer} pair collapses into a single {form scope}, you can finally nest forms with {form detached}, and a round of housekeeping clears out long-deprecated APIs. Please test and report anything that breaks for you.
- PHP 8.3+ and Latte 3.1.4+ are now required.
π₯ Breaking Changes
- CSRF is now strictly same-origin. Forms validate the
Sec-Fetch-Siteheader instead of the old SameSite cookie. The previous mechanism trusted submissions from any subdomain of the same site; the new one demands an exact origin match (scheme + host + port). setValues()/setDefaults()now expectiterable|stdClass.RadioList/CheckboxList:getControlPart()andgetLabelPart()throw on an invalid item key instead of silently returning a nonsensical result.- Removed long-deprecated APIs:**
DataClassGenerator,LatteRenderer,getValues(true)(usegetValues('array')), and the$defaultparameter ofgetOption()(use the??operator), negative validation rules
β¨ New Features
{form scope name}β one tag to replace the easily-confused{formContext}and{formContainer}. It pushes the form onto the stack without emitting<form>, resolving the name relatively to an active form when there is one, otherwise from the top level.{form detached name}β nest forms at last. HTML forbids nested<form>tags, sodetachedemits an empty<form></form>up front and links every control back to it via the HTML5form="..."attribute, no matter where they sit in the DOM.addSubmit()accepts an$onSubmitcallback β attach a click handler right when you create the button, without a separate->onClick[] =.
ποΈ Deprecations
- A missing comma before
{form}arguments β write{form name, attr=val}instead of{form name attr=val}, freeing keywords likescope/detachednext to the name. - Several magic properties