v0.5.0

<p>Git history moves into core, addons are referenced by alias and mounted from config, and the global helper functions become template functions.</p>

30 September 2026

Added

  • App::history(): git-backed drafts, publish and revisions are now core. History, Revision and DeployKey live in phlat/src/History/, replacing the phlat/git addon. isAvailable() is true when data/ is inside a git repo, and require() throws a 404 for routes that need one.
  • Addons declare where their pages/ tree mounts in config: "phlat/admin": {"mount": "admin"}. The mount page no longer has to exist in data/pages/, and a real page at the same slug still takes precedence. phlat/addons/clockwork/pages/index.json ships a mount page for Clockwork.
  • App::addonConfig($id, $key) and the addon() template function read an addon's own settings from its addons.{id} config entry.
  • App::beginRequest() is the single place per-request state is reset under a persistent worker, and it emits app.request:before so addons can reset their own. Registry::reset() clears the registry's per-request memos, which previously lived for the whole worker.
  • PageFiles::serveRequest() and PageFiles::ownerUrl().
  • FieldValue::withValue(), FieldValue::editTemplate() and FieldTypeCollection::count(), so edit templates no longer reach for app().
  • Template functions p(), find(), session(), permission(), config() and addon(), registered in LatteExtension, along with the hx alias.
  • The repeater fieldtype: an ordered list of rows sharing one shape (options.fields), each row readable in templates like a mini page.
  • Class docs in the admin docs reference, and tree highlighting that follows preview navigation.
  • phlat/Dockerfile.fpm, phlat/Caddyfile.fpm and a docker:publish-dev:fpm task for a php-fpm image alongside the FrankenPHP worker setup.
  • declare(strict_types=1) in every PHP file under phlat/.

Changed

  • Addons are referenced by alias only: @admin/login, @ui/button. Two addons that resolve to the same alias now throw at load. AddonRegistry is keyed by alias and drops resolveRef, resolveTemplateRef, idFor, aliasOf and prefixes.
  • AddonPage view and controller overrides now live at views/@alias/, matching template overrides. They previously used the full addon id.
  • App::addons() returns alias => root path.
  • phlat/config.json mounts phlat/admin at admin and phlat/clockwork at __clockwork.
  • ?rev= is handled by History::pageAt() and the auto-commit hook is registered in registerCoreHooks(). The admin gates history and Changes on isAvailable() instead of a null make('git').
  • fresh() is the only invalidation for field, view and fieldtype-meta caches. It compares mtime and size, so a same-second save still invalidates.
  • Item and user files are plain PageFile and PageImage instances carrying a parentUuid. ItemFile, ItemImage, UserFile, UserImage, ResolvesItemUrl and ResolvesUserUrl are removed.
  • File serving moved out of Page::route() into PageFiles::serveRequest(), and App::execute() renders errors through a private renderError().
  • Admin login stores its flash message in the page-scoped session. DirectSessionAccessRule now only flags direct $app->session data access.
  • FieldTypeNumber returns null for a stored non-numeric value instead of throwing.
  • phlat/src/README.md and phlat/src/Toolkit/README.md describe the current design and list every Toolkit class.

Removed

  • The phlat/git addon, phlat/functions.php, phlat/index.php and phlat/addons/admin/index.php.
  • Global app(), page(), query(), q(), session(), s(), find(), permission() and make(). Use $app->page(), $app->request->query(), $page->session() and $app->find() in PHP, and the template functions above in Latte. Templates no longer have app().
  • App::forgetField(), forgetView(), fieldtypeFields(), addon() and addonSession(), and the addon $session argument.
  • App::bind() no longer registers a service under the loading addon's id and alias; use the name you pass.
  • phlat/pages as a page source, and Page::isSystem().
  • Registry::indexAddon() and Registry::addonPages().

Fixed

  • phlat/views/errors/index.latte called the removed f() helper, so every error page fell back to bare HTML. It now renders through the template.

Comments

No comments yet. Be the first!

Loading form…