Skip to content

v5.0.2

Latest

Choose a tag to compare

@g105b g105b released this 12 Aug 09:40
2f7944f

What's Changed

  • tidy: improve request logging and default routing by @g105b in #727
    The default router always uses text/html if not specified. This decision was made to help projects that use a plain fetch() on the client, without sending any headers, so the HTML page would be returned rather than an error. There's also an improvement when a 304 status is returned, meaning there is no content returned at all, so no bytes are returned in the body.

  • feature: add resolved dynamic path classes by @Guflly in #734
    Once the dynamic path parts are resolved, new body classes are added to describe their values, useful for manipulating the page in CSS or JavaScript differently depending on different dynamic values.

  • fix: order of partial loading by @pixeldrift64 in #731
    Partials can now contain components, a bug that had been overlooked in previous versions.

  • feature: automatically redact passwords in logs by @g105b in #728
    If a password field is POSTed, there are now certain fields that are redacted in the logs.

  • JSONDocument improvements by @g105b in #721
    The correct content-type headers are emitted when the developer omits them, and setting an error on the JSONDocument terminates the response early with a settable HTTP status code.

  • Improve trailing slashes by @g105b in #735
    If trailing slashes are forced (default), and a link doesn't have a trailing slash, that's fine because it would be normalised pre-render. But for form submissions, the redirected page would lose POST body. Using a 307 status persists the body through the redirect.

  • build(deps): bump phpgt/database from 1.7.0 to 1.8.0 by @dependabot[bot] in #712

  • build(deps): bump phpgt/fetch from 1.2.2 to 1.2.3 by @dependabot[bot] in #722

  • build(deps): bump phpgt/daemon from 1.1.6 to 1.1.7 by @dependabot[bot] in #724

New Contributors

Thanks to @Guflly for making their first contribution in #734

The new feature adds more classes to the HTML body that describe the values of any dynamic path parts, which can then be used in CSS to style pages differently based on the dynamic path, or in JavaScript to handle dynamic paths differently on the front end.

Full Changelog: v5.0.1...v5.0.2