Skip to content

v1.1.6

Choose a tag to compare

@inerba inerba released this 05 Sep 08:18
· 40 commits to main since this release

Unified form handling with $form, safer JSON upsert & caching in DbConfig, last-updated helpers, global helper, and quality tooling.

🚀 Added

  • AbstractPageSettings
    • Support for using $form (with $content as fallback) for filling and reading state.
    • lastUpdatedAt() helper to get a formatted “last updated” timestamp for the settings group.
    • Save action now includes a mod+s keyboard shortcut.
  • DbConfig
    • Caching support (namespaced cache keys) and safer JSON handling with exceptions.
    • getGroupLastUpdatedAt() to retrieve a formatted last-updated timestamp for a group.
  • Global helper
    • db_config() for quick access to stored settings.
  • i18n
    • New Spanish and French language files.

✨ Changed

  • AbstractPageSettings: removed the hard dependency on InteractsWithSchemas; state is read via $form->getState() when available (falls back to $content).
  • stubs/page.stub: default method is now form() (the old content() continues to work).
  • Expanded PHPDocs and inline comments across AbstractPageSettings and DbConfig.
  • declare(strict_types=1); added to new/updated PHP files.

🐛 Fixed

  • More robust save flow: throws a clear RuntimeException if the form instance does not expose getState().

🛠 Dev

  • Added phpstan/phpstan to require-dev.
  • Minor composer tidy-ups and docs cleanup.

Upgrade notes

  • No breaking changes.
  • Consider implementing form(Schema $schema) in old pages; legacy content() remains supported.
  • You can now display “last updated” using AbstractPageSettings::lastUpdatedAt() or DbConfig::getGroupLastUpdatedAt().

Full Changelog: v1.1.5...v1.1.6