Release v0.2.24
- feat(fragment): App::fragment(name, fn) — htmx-essay template fragments.
Mark named regions inside a template; the same App::render('page', args)
call serves the full page (no selector) or just one region (selector
passed via $args['fragment']). 5th member of the file-execution family
alongside render / renderToString / renderStream / include. Honours the
universal return contract (int=status / array=JSON / string=HTML /
Generator=stream). Missing fragment → HTTP 404, no silent fallback.
- fix(session): session_start() auto-emits Set-Cookie on first-time
visitors (PR #12). Restores correct OAuth/redirect behaviour where a
302 used to go out with no PHPSESSID and the next request started a
fresh session.
- fix(executeFile): HaltException catch no longer drops the buffered
output when no explicit result was captured. echo "x"; throw new
HaltException now correctly returns "x" as the body.
Lessons:
- /learn/htmx extended with "Template fragments — one file, two responses"
- /learn/sessions extended with "First-visit cookie" section (PR #12)
Live demo: /demo/fragments/contacts
PHPStan level 10 clean. 362 unit + 147 integration tests pass.