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 itserrorcallback on a network error instead of never settling. It rejects with anAbortErrorwhen its abort signal fires, instead of never settling.(thanks to @johannschopplich) #8770 #8774panel.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 likeplugin.icon-2for one. (thanks to @johannschopplich) #8773
🚨 Breaking changes
Core
- Removed deprecated methods:
Kirby\Cms\ModelWithContent::createDefaultContent(), useKirby\Cms\ModelWithContent::createContent()insteadKirby\Cms\ModelWithContent::isLocked(), use$model->lock()->isLocked()insteadKirby\Cms\ModelWithContent::readContent(), use$model->version()->read()insteadKirby\Cms\ModelWithContent::writeContent(), use$model->version()->save()insteadKirby\Cms\ModelWithContent::saveContent()andKirby\Cms\ModelWithContent::saveTranslation(), useKirby\Cms\ModelWithContent::save()insteadKirby\Cms\Page::updateParentCollections(), useKirby\Cms\ModelState::update()insteadKirby\Content\Translation::contentFile(), no replacementKirby\Content\Translation::isDefault(), use$translation->language()->isDefault()insteadKirby\Content\Translation::parent(), useKirby\Content\Translation::model()insteadKirby\Content\Translation::update(), use$model->version()->update()insteadKirby\Http\Url::to(), useKirby\Cms\Url::to()or therl()helper instead.Kirby\Filesystem\Dir::inventory(), useKirby\Cms\Inventory::for()instead.
- Removed the
model-content-fileandtranslation-methodskeys fromKirby\Cms\Helpers::$deprecations Kirby\Http\Urlthrows aKirby\Exception\BadMethodCallExceptionfor static calls that are neither a method nor a property ofKirby\Http\Uri, instead of returningnull.Kirby\Cms\Page::inventory(),Kirby\Cms\Site::inventory()andKirby\Cms\User::inventory()return aKirby\Cms\Inventoryobject. UseKirby\Cms\Inventory::children(),Kirby\Cms\Inventory::files()andKirby\Cms\Inventory::template()instead of the array keys.Kirby\Cms\Inventory::child()andKirby\Cms\Inventory::template()are no longer static.Kirby\Cms\Inventory::child()takes$itemand$models, andKirby\Cms\Inventory::template()is public and takes no arguments. Subclasses that override or call them need to be updated.Kirby\Filesystem\Dir::$numSeparatorhas been removed. UseKirby\Cms\Inventory::$numSeparatorinstead.
Panel
- Writer: the editor's
dropevent 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
preserveListenersmixin - 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.challengesaccepts options per type, likeauth.methods.- New
Kirby\Auth\Method::label(),Kirby\Auth\Challenge::label(),Kirby\Auth\Challenge::options()andKirby\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, unlessauth.debugisfalse. Withdebugenabled, the exception is thrown.
🐛 Bug fixes
- Preview view:
- Structure fields inside a block with
preview: fieldsnow show rows edited in the block drawer correctly, and edits from the preview table no longer overwrite them. #8753 - Listeners on components with
inheritAttrs: falseno longer keep using the handler from the first render. Removed listeners also stop firing. panel.events.unsubscribe()also removes the capture-phaseblur,copy,focusandpastelisteners. (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
imageandtextoptions #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()andKirby\Auth\Challenge::__construct()require atypeargument.Kirby\Auth\Challenge::__construct()also takesoptions. 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()andKirby\Auth\Challenge::settings()are no longer static. Use$this->auth,$this->options,$this->userand$this->modeinstead of their removed arguments.Kirby\Auth\Challenge::isEnabled()receives the registered$typeand its$options.Kirby\Auth\Method\BasicAuthMethod::isEnabled()takes the basic auth header and$faildirectly.Kirby\Auth\Method::type()andKirby\Auth\Challenge::type()return the registered type, not one derived from the class name.