github getkirby/kirby 6.0.0-beta.4

pre-releaseone hour ago

Note

You can find the full changelog and docs for Kirby 6 over here: https://getkirby.com/releases/6

🏎️ Performance

  • Pages and Panel views with JPEG, PNG or WebP thumbnails render faster, up to 6× with large originals like phone photos
  • Pages with many children load faster when (many) page models are registered: each child is checked against the models most common among its siblings first. #8640 (thx @ovenum)
  • HTML attributes are built several times faster, which speeds up pages with many links, images and KirbyTags (about 20% on text-heavy pages) #8800
  • Reading page content, e.g. $page->title() or $pages->template(), and $page->files() no longer needs to resolve the children of the page directory. #8643 (thx @leobardimpact)
  • Pages with long blocks fields render faster, about 2× with 100 blocks and 3× with 200 blocks #8799

🐛 Bug fixes

  • $helper.upload() rejects and calls its error callback on a network error instead of never settling. It rejects with an AbortError when its abort signal fires, instead of never settling.(thanks to @johannschopplich) #8770 #8774
  • panel.api.site.update() updates the site instead of failing with a missing route. (thanks to @johannschopplich) #8771
  • $helper.string.hasEmoji() no longer counts digits, # and as emoji, so <k-icon> no longer mistakes icon types like plugin.icon-2 for one. (thanks to @johannschopplich) #8773

🚨 Breaking changes

Core

  • Removed deprecated methods:
    • Kirby\Cms\ModelWithContent::createDefaultContent(), use Kirby\Cms\ModelWithContent::createContent() instead
    • Kirby\Cms\ModelWithContent::isLocked(), use $model->lock()->isLocked() instead
    • Kirby\Cms\ModelWithContent::readContent(), use $model->version()->read() instead
    • Kirby\Cms\ModelWithContent::writeContent(), use $model->version()->save() instead
    • Kirby\Cms\ModelWithContent::saveContent() and Kirby\Cms\ModelWithContent::saveTranslation(), use Kirby\Cms\ModelWithContent::save() instead
    • Kirby\Cms\Page::updateParentCollections(), use Kirby\Cms\ModelState::update() instead
    • Kirby\Content\Translation::contentFile(), no replacement
    • Kirby\Content\Translation::isDefault(), use $translation->language()->isDefault() instead
    • Kirby\Content\Translation::parent(), use Kirby\Content\Translation::model() instead
    • Kirby\Content\Translation::update(), use $model->version()->update() instead
    • Kirby\Http\Url::to(), use Kirby\Cms\Url::to() or the rl() helper instead.
    • Kirby\Filesystem\Dir::inventory(), use Kirby\Cms\Inventory::for() instead.
  • Removed the model-content-file and translation-methods keys from Kirby\Cms\Helpers::$deprecations
  • Kirby\Http\Url throws a Kirby\Exception\BadMethodCallException for static calls that are neither a method nor a property of Kirby\Http\Uri, instead of returning null.
  • Kirby\Cms\Page::inventory(), Kirby\Cms\Site::inventory() and Kirby\Cms\User::inventory() return a Kirby\Cms\Inventory object. Use Kirby\Cms\Inventory::children(), Kirby\Cms\Inventory::files() and Kirby\Cms\Inventory::template() instead of the array keys.
  • Kirby\Cms\Inventory::child() and Kirby\Cms\Inventory::template() are no longer static. Kirby\Cms\Inventory::child() takes $item and $models, and Kirby\Cms\Inventory::template() is public and takes no arguments. Subclasses that override or call them need to be updated.
  • Kirby\Filesystem\Dir::$numSeparator has been removed. Use Kirby\Cms\Inventory::$numSeparator instead.

Panel

  • Writer: the editor's drop event passes one object instead of four arguments: this.editor.on("drop", ({ view, event, slice, moved }) => {}) #8780

🧹 Housekeeping

  • New unit tests for k-structure-field's value watcher and selection handling
  • New unit tests for updated and removed listeners in the preserveListeners mixin
  • Updated JS and PHP dependencies
  • Kirby's Composer dependencies now allow patch and minor updates, so Composer installs get upstream security fixes without waiting for a Kirby release #8789

Changes since Beta.3

✨ Enhancements

  • Auth:
    • Auth methods and challenges can be registered under several types, e.g. one LDAP login method per directory.
    • auth.challenges accepts options per type, like auth.methods.
    • New Kirby\Auth\Method::label(), Kirby\Auth\Challenge::label(), Kirby\Auth\Challenge::options() and Kirby\Auth\Challenges::config()
    • Auth methods that throw any exception from their constructor or isEnabled() are left out and the exception is written to the PHP error log, unless auth.debug is false. With debug enabled, the exception is thrown.

🐛 Bug fixes

  • Preview view:
    • Links inside the preview browser now stay in the preview when Kirby is installed in a subfolder #7935
    • The preview browser can be scrolled again in Safari #7935
    • The preview browser keeps its scroll position when it reloads after content changes #7935
  • Structure fields inside a block with preview: fields now show rows edited in the block drawer correctly, and edits from the preview table no longer overwrite them. #8753
  • Listeners on components with inheritAttrs: false no longer keep using the handler from the first render. Removed listeners also stop firing.
  • panel.events.unsubscribe() also removes the capture-phase blur, copy, focus and paste listeners. (thanks to @johannschopplich) #8772
  • Adding the first text, heading, quote or list block to a blocks field no longer throws an error, and the new block is focused #8762
  • Pages, files and users previews in structure/object fields use the field's image and text options #8792
  • Long page titles and filenames no longer overflow the link field and its previews in structure and object fields #8786
  • Tag previews in tables stay on one line and show a "+N" counter for tags that don't fit
  • The upload dialog shows upload errors again, e.g. when a file with the same name already exists. #8796

♻️ Refactored

  • The writer is loaded with the rest of the Panel again instead of on demand
  • $helper.string.sanitizeHTML() is synchronous again. Code that awaits its result keeps working.

🚨 Breaking changes to previous betas

  • Auth
    • Kirby\Auth\Method::__construct() and Kirby\Auth\Challenge::__construct() require a type argument. Kirby\Auth\Challenge::__construct() also takes options. Subclasses that override the constructor must accept both, as they are passed as named arguments.
    • Kirby\Auth\Method::icon(), Kirby\Auth\Method::isEnabled(), Kirby\Auth\Method::settings(), Kirby\Auth\Method::type(), Kirby\Auth\Challenge::icon(), Kirby\Auth\Challenge::isAvailable() and Kirby\Auth\Challenge::settings() are no longer static. Use $this->auth, $this->options, $this->user and $this->mode instead of their removed arguments.
    • Kirby\Auth\Challenge::isEnabled() receives the registered $type and its $options.
    • Kirby\Auth\Method\BasicAuthMethod::isEnabled() takes the basic auth header and $fail directly.
    • Kirby\Auth\Method::type() and Kirby\Auth\Challenge::type() return the registered type, not one derived from the class name.

Don't miss a new kirby release

NewReleases is sending notifications on new releases.