Releases: getkirby/kirby
Releases · getkirby/kirby
5.0.0-beta.4
Pre-release notes: https://getkirby.com/releases/5
Changelog since 5.0.0-beta.3
🎉 Features
- New
::toEntries()
field method #6993 for the new Entries field.
<ul>
<?php foreach ($page->myEntries()->toEntries() as $entry): ?>
<li><?= $entry->upper() ?></li>
<?php endforeach ?>
</ul>
✨ Enhancements
- New
ExceptionField
class #7002 - Multiple storage reads are avoided with a new VersionCache class. #6989
- New icons: #7055
accessibility
ai
cloud
info-card
kirby
rocket
rss
shield
shut-down
terminal
wallet
- New
$model->versions()
method returning a versions collection (currently changes and latest) #7059 - New
Language::is()
method to compare Language objects - Pick up new model objects when a model is updated within a hook, even if the new model object is not returned by the hook
✨ Enhancements from previous betas
- New wildcard option for
Version::delete('*')
- New
PlainTextStorage::isSameStorageLocation()
implementation, which compares text file locations for more accurate results. ModelWithContent::changeStorage()
has a new second, boolean$copy
argument, which is false by default. Storage is thus moved by default, but can be copied on demand.ModelWithContent::save()
andModelWithContent::convertTo()
use that new$copy
flag to create a fully in-memory copy for the old instance.
🐛 Bug fixes
- Fix writer update issue #6959
- Fixed password reset dialog in dark mode #7003
- Fix tree branch color in move dialog #6952
k-item
: fix non-selectable state #7024- Hide label and counter for fields in the entries field #7039
User::delete()
will now properly callfile.delete
hooks for deleted user files.
🐛 Fixed regressions and issues from previous betas
- Page blueprint: changeTemplate doesn’t produce multiple content files anymore #7008
- Fix generating redundant image data in content files #6992
- Virtual content is no longer ignored when actual content file exists #7010
- Cancel running requests when discarding or publishing content #6869
- Fixed nested
::update
calls in hooks #6869 - Versions will be properly deleted for all storage handlers when Model delete actions are executed
- Enforce
pages.preview
permission again
🚨 Breaking changes
- Removed
Kirby\Form\Form::exceptionField()
#7002 - When working with old model instances in hooks, the models can no longer overwrite their content. This will now throw an exception if you try. Use the new model instances instead.
$page::translation()
returns a single translation in single language mode. This is also included in the$page::toArray()
method$page::translation()
returns a newKirby\Content\Translation
object instead of the oldKirby\Content\ContentTranslation
object.- The
Kirby\Content\ContentTranslation
class has been removed and repalced withKirby\Content\Translation
$page::translations()
returns a newKirby\Content\Translations
collection instead of a genericKirby\Content\Collection
It will always include at least one language - even in single language mode.Kirby\Content\Content::update()
is actively deprecated and must no longer be used. It will throw an exception to find usage early on.- The
ModelWithContent::$content
andModelWithContent::$translations
cache props have been removed. User::create()
does no longer accept null as argument.- Setting a name field in
User::update
does no longer have any effect. UseUser::changeName()
instead. HasMethods::hasMethod()
andHasMethods::callMethod()
are now protected methods #7058ModelWithContent::versions()
is no longer available as direct field accessor. You need to use$model->content()->versions()
instead if you are using a field with the nameversions
. #7059- The internal
$originalEvent
parameters forApp::apply()
andApp::trigger()
have been removed as they are no longer used in the core.
☠️ Deprecated
ModelWithContent::readContent
: Use$model->version()->read()
instead #7013ModelWithContent::writeContent
Use$model->version()->write()
instead #7013
♻️ Refactored
- Model improvements #7020 #7021 #7023 #7029
- Make sure that the template in the
Page::factory()
method is always lowercase - Make sure that the model name in
Page::model()
is always lowercase - Make sure that the template name is always lowercase in the Page::setTemplate method
- Call
::setBlueprint
in Model constructors before setting content - Use
Page::updateParentCollections
in the::commit
method and remove redundant calls. - Add
::updateParentCollection
methods to FileActions and UserActions and use them in their commit methods - Replace
User::
withstatic::
in user actions. - Add a unit test for creating a user with a password
- Move pagesMethods tests into
Pages/PagesMethodsTest.php
- Use PHPUnit attributes for Model Blueprint tests
- Improve the cache id in the MemoryStorage class
- Undeprecate useful methods in the Translation class
- Replace Page:: with static:: in PageActions
- Simplify Page::createNum
- Improve indentation in the Site class
- Remove ::hardcopy from ::commit in model actions
- New
HasModels
trait App::setSite()
is now public and can be used to overwrite the current site instance- New
Page::normalizeProps()
- New
File::noramlizeProps()
- New
User::normalizeProps()
- New
ModelWithContent::changeStorage()
method. - New virtual page tests
- Unit tests for Models have been reorganized and cleaned up
- New
Kirby\Cms\ModelCommit
class - New
Kirby\Cms\ModelState
class - Uses the new
ModelCommit
class in all action classes
- Make sure that the template in the
- New
Kirby\Cms\Collection::update($object)
method - New
Kirby\Cms\Events
class that handles low-level hook execution
♻️ Refactored from previous betas
- The MemoryStorage class uses the object id for guaranteed uniqueness
- A couple methods in
Kirby\Content\Translation
have been undeprecated because they turn out to be useful::code()
::content()
::exists()
- Moved the folder clean up logic into the
Kirby\Content\PlainTextStorage
handler - Refactor
User::delete()
,Page::delete()
andFile::delete()
to delete the Versions properly
🧹 Housekeeping
- Clean up
@see
tag consistency in the core code
4.7.0-rc.1
✨ Enhancements
- New
session::store
core component: return your customSessionStore
handler #6961 - Show info text when variable is an array #6930
- The Vue template compiler can be switched off in the config. This will load the vue runtime version. Plugins and the lab views that rely on the template compiler will no longer work.
// `/site/config/config.php` return [ 'panel' => [ 'vue' => [ 'compiler' => false ] ] ];
- Panel: user needs to confirm current password when changing their own password or the password of another user (e.g. as admins) #6971
- Panel system view: Some security checks will be skipped on local setups #6932
- The security check for an accessible
kirby
folder now uses theLICENSE.md
file instead ofcomposer.json
to avoid false-positive blocks by web application firewalls #6932
🐛 Bug fixes
- Custom sections: fixed issue where Vue mixin would overwrite
load
method #6809 - Requests for a page's
html
representation get redirected to the normal page URL without extension #6509 - Panel menu: fixed backdrop on narrow viewports #6983
- Link dialog: fixed permalinks for default language #6982
- Fixed file template wrongfully being written to secondary language content file #6739
- Add missing title for toolbar buttons #6998
5.0.0-beta.3
Pre-release notes: https://getkirby.com/releases/5
Changelog since 5.0.0-beta.2
🎉 Features
New entries
field
Batch delete mode
New option for pages and files sections, to delete multiple files or pages at once https://kirby.nolt.io/38
PDF file preview
In addition to audio and video files, we've now also added a PDF preview to the core:
✨ Enhancements
- Support for content representation specific site controllers, e.g.
site.rss.php
#6950 - New
Kirby\Cms\Pages::delete(array $ids)
andKirby\Cms\Files::delete(array $ids)
methods to handle batch delete for multiple files in a collection. - New batch mixin for model sections (pages & files), which introduces the batch option and a computed property to check for supported layouts.
- New
selectable
property for the<k-item>
and<k-items>
components. When set to true, the items show checkboxes and emit an select event, when the checkbox is clicked. - The
files
andpages
sections introduce newdelete
API endpoints. Those endpoints can take a set of page or file ids and will delete each one. Errors will be caught and sent back in the details array of the final thrown exception.
✨ Enhancements for earlier beta features
- View buttons: support
name: true
notation #6928 - UI component class: support non-pre-defined props #6929
🐛 Bug fixes
- Select, radio and toggles field: values that include a comma will not be split into two tags in the structure field preview anymore #5800
- Blocks field: fix empty display #6951
- Fix Drag & Drop between block fields #5290
- Drawers + Fields block: collapse tabs in header correctly into dropdown for narrow columns #6914
🐛 Fixed regressions from earlier betas
- Languages dropdown: fix changing language #6945
- Sticky column offset from sticky header
- Always use
date
handler for changes timestamp #6937
🚨 Breaking changes
- File drag texts in the Panel always use the file UUID, if UUIDs are not disabled #6948
api.methodOverwrite
option has been renamed toapi.methodOverride
☠️ Deprecated
- Color field: the
text => value
notation for options has been deprecated and will be removed in Kirby 6. Please rewrite your options asvalue => text
. #6913
🧹 Housekeeping
- Updated dependencies
- Updated todo comments #6987
4.6.1
4.6.0
✨ Enhancements
- PHP 8.4 support
- New bluesky icon
🐛 Bug fixes
- Fixed CSS rules messing up grid styling inside the gallery block drawer #6838
- Fix alt attribute for
FileVersion
instances #6852 - Using single quotes in sqlite table discovery query fixes #6769
- Fix console error when no buttons available #6863
- Structure field: fix label of remove dropdown item #6899
- Block options: fix tabbing from sort handle #6893
- Structure field: fix preview input when paginated #6894
- Set require: true on image block location field #6905
- Blueprint
image
option: fixed support for query string #6916 - System view: fixed too long server software names #6917
- Pages and files sections: fixed
page
option #6735 - Role blueprints get properly extended #6918
- Link field: fixed handling of invalid options #6919
- Fixed
js()
/css()
helpers parameters
🧹 Housekeeping
5.0.0-beta.2
Pre-release notes: https://getkirby.com/releases/5
Changelog since 5.0.0-beta.1
✨ Enhancements
- Allow disable all page buttons via
buttons: false
- New way to set the default storage instance for all models #6867
- New
App::storage(ModelWithContent $model)
method - New
storage
component, which can be overwritten in plugins or the app instance setup. - The storage component is now used in all Models to create the default storage instance
// How to create a new default storage instance component: use Kirby\Cms\App; use Kirby\Cms\ModelWithContent; use Kirby\Content\PlainTextStorage; class MyCustomStorageClass extends PlainTextStorage { } // on app initialisation $kirby = new App([ 'components' => [ 'storage' => function (App $kirby, ModelWithContent $model) { return MyCustomStorageClass($model); ] ] ]); // in a plugin App::plugin('my/storage', [ 'components' => [ 'storage' => function (App $kirby, ModelWithContent $model) { return MyCustomStorageClass($model); ] ] ]);
- New
- New
$app->role()
method that works like$app->user()
to return a specific role or the role of the current user. #6874 - View buttons: i18n + query support, component name from key
Panel\Ui\Button
: i18n support fortext
andtitle
propsPanel\Ui\Buttons\ViewButtons
andPanel\Ui\Buttons\ViewButton
have new optional$model
property- Kirby query support in
Panel\Ui\Buttons\ViewButton
forlink
,dialog
,drawer
,icon
,text
,theme
props - Deriving the Vue component name from key:
This first looks up
buttons: - preview retour: text: Retour
k-retour-view-button
and falls back tok-view-button
.
- Writer: nodes with
inline: true
in their button definition are displayed as inline buttons in toolbar (instead inside the dropdown) #6902 - New
this.$helper.object.filter(object, predicate)
. #6902 - Page status button uses custom status labels for
title
#6911 - Plugin update status: passive theme for unknown plugin versions #6920
- System view: Plugin table features two distinct columns for the license type and status #6896
- LicenseStatus supports
link
,dialog
anddrawer
props #6896
🐛 Bug fixes
- Fixed
Str::ucfirst()
behavior, now behaves like PHP default #6834 - Writer field: inline toolbar is hidden when no nodes and marks are available #6804
- Page dropdown: fix disabling preview item #6891
- File preview: fix aspect ratio for medium viewports #6891
- Page section w/ table layout: fix flag column #6866
- Range/Number field: fix
isEmpty()
usage #6898 - Custom writer nodes: fixed active state detection for nodes that include paragraph child nodes #6902
- Permissions are now always correctly determined if the active user changes during the request #6880
🐛 Fixed regressions from Beta.1
- Hide language selector for single language #6850
- Duplicate action is forcing to copy files #6921
- Link in info box is now visible again in dark mode #6906
🚨 Breaking changes
- The
Str::ucfirst()
method no longer lowercases all but the first letter of the text, it only capitalizes the first letter. #6860 - Classes extending
ModelPermissions
need to set their category with theconst CATEGORY
orstatic function category()
instead ofprotected string $category
and use the staticuser()
method instead of$user
and$permissions
properties #6880 <k-item>
: Removeddata-only-option
attributes<k-dialog>
: Removeddata-has-footer
attribute<k-toggles-input>
: Removeddata-disabled
attribute<k-writer-input>
: Removeddata-toolbar-inline
attribute<k-bubble>
: Removeddata-has-text
attribute<k-header>
: Removeddata-has-buttons
attribute<k-tag>
: Removeddata-has-image
anddata-has-toggle
attributes<k-tree>
: Removeddata-has-subtree
attributerequired: true
on checkbox and toggle fields now enforces that these fields need to be checked/toggles (active state)
☠️ Deprecated
panel.favicon
option throws deprecation warnings forurl
option (usehref
instead) and forrel
key (userel
option instead)
♻️ Refactored
ModelPermissions
now also supportsLanguage
objects as quasi models #6876- New
LanguagePermissions
class that inherits the existing logic fromLanguageRules
for consistency with other models #6876 - Globally cache
access
andlist
permissions per permission category, model type and user role to reduce code duplication #6881
♻️ Refactored after Beta.1
- Update preview token logic to reliably fix tokens for the homepage #6856
🧹 Housekeeping
- Move
$app->roles()
method to theAppUsers
trait to increase the overview - Clean up permission-related code for consistency #6879
4.6.0-rc.1
🐛 Bug fixes
- Fixed CSS rules messing up grid styling inside the gallery block drawer #6838
- Fix alt attribute for
FileVersion
instances #6852 - Using single quotes in sqlite table discovery query fixes #6769
- Fix console error when no buttons available #6863
- Structure field: fix label of remove dropdown item #6899
- Block options: fix tabbing from sort handle #6893
- Structure field: fix preview input when paginated #6894
- Set require: true on image block location field #6905
- Blueprint
image
option: fixed support for query string #6916 - System view: fixed too long server software names #6917
- Pages and files sections: fixed
page
option #6735 - Role blueprints get properly extended #6918
- Link field: fixed handling of invalid options #6919
🧹 Housekeeping
5.0.0-beta.1
Pre-release notes: https://getkirby.com/releases/5
4.5.0
✨ Enhancements
avif
images are now considered resizable by default #6670- User view: show prev/next buttons also on account view #6610
- Video block: better
autoplay
handling panel.upload
exposes upload dialogopen
event #6621- New
Toolkit\Obj::toKeys()
method #6651 - Improved
Roles
filter methods #6655 - New
angle-dropdown
button #6663
- Improved highlighting of current items in a dropdown #6672
- Tags input: dropdown shows current selection via checkbox/radio button #6698
api.methodOverwrite
config option to activate purePATCH
requests #6650- Moving pages: allow pages as parent that don’t restrict any templates in their blueprint, but feature at least one pages section listing the page’s children #6717
- Role always shown when creating a new user, even if only one role available #6654
- Support
icon
andinfo
for query and api options #6780 - Changed the status update host to getkirby.com #6787
- Update composer dependencies
🐛 Bug fixes
- Fixed
$field->isEmpty()
for some empty arrays #6637 slugs.maxlength
option works now #6526- Fix updating new language variables for secondary languages #6622
- Page create dialog:
toggle
field allowed #6669 User::roles()
doesn't return only the current role for non-admin users but all available roles #6663- Fixed issue where the page create dialog would use an existing page
new
instead just creating a temporary object #6643 - Radio input: fix default columns count #6699
- Multilang: Writer field now inserts the correct permalink for the current content language #6668
- Multilang:
$page->permalink()
returns a language-based permalink for the current content language #6668 - Fixed uploading non-resizable files with template/blueprint that features
create
option #6718 - Fixed some cached page and file properties #6720
- The license key dialog now trims accidently copied spaces from the license key #6722
- Panel UI fixed for
create
andchangeRole
permissions and user options #5147 #5146 - Fix preview links for files when the parent page preview is disabled #6786
☠️ Deprecated
UserRules::validRole()
♻️ Refactored
- Remove roles count check from
UserPermissions
#6658
5.0.0-alpha.4
Pre-release notes: https://getkirby.com/buzz/v5-alpha