Releases: craftcms/cms
Releases · craftcms/cms
6.0.0-alpha.1
Development
- Reference tags now support fallback values when no attribute is specified. (#17688)
- Deprecated support for categories, global sets, and tags. (#18009)
Extensibility
- Added
CraftCms\Cms\Support\Arr. - Added
CraftCms\Cms\Support\DateTimeHelper. - Added
CraftCms\Cms\Support\File. - Added
CraftCms\Cms\Support\Facades\Path. - Added
CraftCms\Cms\Support\Facades\Markdown. - Added
CraftCms\Cms\Support\Path. - Added
CraftCms\Cms\Support\Str. - Added
CraftCms\Cms\Support\URL. - Added
CraftCms\Cms\action_url(),CraftCms\Cms\cp_url(), andCraftCms\Cms\site_url()helper functions. craft\services\Elements::stopCollectingCacheInfo()no longer sets the returned duration to thecacheDurationconfig setting if a duration wasn’t explicitly declared. (#16796)- Deprecated
craft\helpers\ArrayHelper.CraftCms\Cms\Support\Arrshould be used instead. - Deprecated
craft\helpers\ConfigHelper.CraftCms\Cms\Support\Configshould be used instead. - Deprecated
craft\helpers\DateTimeHelper.CraftCms\Cms\Support\DateTimeHelpershould be used instead. - Deprecated
craft\helpers\Diff.CraftCms\Cms\Support\Diffshould be used instead. - Deprecated
craft\helpers\ElementHelper.CraftCms\Cms\Element\ElementHelpershould be used for core element helper APIs,CraftCms\Cms\Element\ElementSourcesfor source lookup,CraftCms\Cms\Element\ElementAttributeRendererfor attribute rendering,CraftCms\Cms\Element\Draftsfor provisional draft helpers,CraftCms\Cms\Field\Enums\TranslationMethodfor translation helpers, andIlluminate\Support\Facades\ContextwithCraftCms\Cms\Element\Drafts::CONTEXT_PREVIEW_USER_IDfor preview-user context. - Deprecated
craft\helpers\Html.CraftCms\Cms\Support\Htmlshould be used instead. - Deprecated
craft\helpers\HtmlPurifier.CraftCms\Cms\Support\HtmlSanitizer\HtmlSanitizersshould be used for HTML sanitization, andCraftCms\Cms\Support\Strshould be used for UTF-8 cleanup instead. - Deprecated
craft\helpers\HtmlPurifier::process().CraftCms\Cms\Support\HtmlSanitizer\HtmlSanitizers::sanitize()should be used instead. - Deprecated
craft\helpers\HtmlPurifier::cleanUtf8(). - Deprecated
craft\helpers\HtmlPurifier::convertToUtf8().CraftCms\Cms\Support\Str::convertToUtf8()should be used instead. - Deprecated
craft\helpers\HtmlPurifier::configure().CraftCms\Cms\Support\HtmlSanitizer\HtmlSanitizers::defaults()or a custom sanitizer registration should be used instead. - Deprecated
config/craft/htmlpurifier/*.jsonsanitizer config files. Sanitizers should be registered onCraftCms\Cms\Support\HtmlSanitizer\HtmlSanitizersinstead. - Deprecated
craft\services\Path.CraftCms\Cms\Support\Pathshould be used instead. - Deprecated
craft\helpers\SessionHelper.Illuminate\Support\Facades\Sessionshould be used instead. - Deprecated
craft\helpers\Sequence.CraftCms\Cms\Support\Sequenceshould be used instead. - Deprecated
craft\helpers\StringHelper.CraftCms\Cms\Support\Strshould be used instead. - Deprecated
Craft::$app->getConfig()->getGeneral().CraftCms\Cms\Config\GeneralConfigshould be used instead. This can be used through dependency injection or throughapp(CraftCms\Cms\Config\GeneralConfig::class). - Deprecated
craft.app.config.generalin Twig.app.config.craft.generalshould be used instead. - Deprecated
craft\helpers\App::env(),CraftCms\Cms\Support\Env::get()should be used instead. - Deprecated
craft\markdown\Markdown,craft\markdown\GithubMarkdown,craft\markdown\MarkdownExtra, andcraft\markdown\PreEncodedMarkdown.CraftCms\Cms\Support\Facades\Markdownshould be used instead. - Deprecated
craft\helpers\DateRange.CraftCms\Cms\Shared\Enums\DateRangeTypeandCraftCms\Cms\Shared\Enums\DateRangePeriodshould be used instead. - Deprecated
craft\helpers\Cp. One of the following classes should be used instead:CraftCms\Cms\Cp\AlertsCraftCms\Cms\Cp\FormFieldsCraftCms\Cms\Cp\Html\ContentHtmlCraftCms\Cms\Cp\Html\ElementHtmlCraftCms\Cms\Cp\Html\ElementIndexHtmlCraftCms\Cms\Cp\Html\MenuHtmlCraftCms\Cms\Cp\Html\PreviewHtmlCraftCms\Cms\Cp\Html\StatusHtmlCraftCms\Cms\Cp\IconsCraftCms\Cms\Cp\RequestedSite
- Deprecated
craft\helpers\Json.CraftCms\Cms\Support\Jsonshould be used instead. - Deprecated
craft\services\Composer.CraftCms\Cms\Support\Composershould be used instead. - Deprecated
craft\enums\Color.CraftCms\Cms\Support\Enums\Colorshould be used instead. - Deprecated
craft\enums\AttributeStatus.CraftCms\Cms\Element\Enums\AttributeStatusshould be used instead. - Deprecated
craft\enums\CmsEdition.CraftCms\Cms\Editionshould be used instead. - Deprecated
craft\enums\ElementIndexViewMode.CraftCms\Cms\Element\Enums\ElementIndexViewModeshould be used instead. - Deprecated
craft\enums\LicenseKeyStatus.CraftCms\Cms\Support\Enums\LicenseKeyStatusshould be used instead. - Deprecated
craft\enums\MenuItemType.CraftCms\Cms\Element\Enums\MenuItemTypeshould be used instead. - Deprecated
craft\enums\PropagationMethod.CraftCms\Cms\Element\Enums\PropagationMethodshould be used instead. - Deprecated
craft\enums\TimePeriod.CraftCms\Cms\Support\Enums\TimePeriodshould be used instead. - Deprecated
craft\services\Gc.CraftCms\Cms\GarbageCollection\GarbageCollectionshould be used instead. - Deprecated
craft\services\Api.CraftCms\Cms\Support\Apishould be used instead. - Deprecated
craft\helpers\Api.CraftCms\Cms\Support\Apishould be used instead. - Deprecated
craft\nameparsing\CustomLanguage.CraftCms\Cms\Shared\Nameparser\CustomLanguageshould be used instead. - Deprecated
craft\helpers\App. The following classes/methods should be used instead:-
General helpers
App:devMode()->app()->hasDebugModeEnabled()App:parseBooleanEnv()-->\CraftCms\Cms\Support\Env::parseBoolean()App:normalizeValue()-->\CraftCms\Cms\normalizeValue()App:maxPowerCaptain()-->\CraftCms\Cms\maxPowerCaptain()App:silence()-->\CraftCms\Cms\silence()App:backtrace()-->\CraftCms\Cms\backtraceAsString()-
Env
App:env()-->\CraftCms\Cms\Support\Env::get()App:parseEnv()-->\CraftCms\Cms\Support\Env::parse()-
PHP
App:phpVersion()-->\CraftCms\Cms\Support\PHP::version()App:extensionVersion()-->\CraftCms\Cms\Support\PHP::extensionVersion()App:phpConfigValueAsBool()-->\CraftCms\Cms\Support\PHP::configValueAsBool()App:phpConfigValueInBytes()-->\CraftCms\Cms\Support\PHP::configValueInBytes()App:phpSizeToBytes()-->\CraftCms\Cms\Support\PHP::sizeToBytes()App:phpConfigValueAsPaths()-->\CraftCms\Cms\Support\PHP::configValueAsPaths()App:normalizePhpPaths()-->\CraftCms\Cms\Support\PHP::normalizePaths()App:isPathAllowed()-->\CraftCms\Cms\Support\PHP::isPathAllowed()App:phpExecutable()-->\CraftCms\Cms\Support\PHP::executable()App:testIniSet()-->\CraftCms\Cms\Support\PHP::testIniSet()App:checkForValidIconv()-->\CraftCms\Cms\Support\PHP::checkForValidIconv()App:supportsIdn()-->\CraftCms\Cms\Support\PHP::supportsIdn()-
License
App:licenseKey()-->app(\CraftCms\Cms\License\License::class)->key()App:licensingIssues()-->app(\CraftCms\Cms\License\License::class)->issues()App:licenseShunCookieName()-->app(\CraftCms\Cms\License\License::class)->shunCookieName()App:licensingIssuesHash()-->app(\CraftCms\Cms\License\License::class)->issuesHash()
-
- Deprecated
Craft::createGuzzleClient().CraftCms\Cms\Support\Facades\Http::create()should be used instead. - Deprecated
craft\helpers\FileHelper.CraftCms\Cms\Support\Fileshould be used instead. - Deprecated
craft\helpers\UrlHelper.CraftCms\Cms\Support\URLshould be used instead.
Deprecator
- Added
CraftCms\Cms\Support\Facades\Deprecator. - Added
CraftCms\Cms\Deprecator\Commands\ClearDeprecations. - Removed
craft\console\controllers\ClearDeprecationsController.php. - Deprecated
craft\services\Deprecator.CraftCms\Cms\Deprecator\Deprecatorshould be used instead. - Deprecated
craft\models\DeprecationError.CraftCms\Cms\Deprecator\Models\DeprecationErrorshould be used instead. - Deprecated
craft\errors\DeprecationException.CraftCms\Cms\Deprecator\Exceptions\DeprecationExceptionshould be used instead.
Console commands
- Added
php craft twig:cache- Precompile Twig views - Added
php craft twig:clear- Clear precompiled Twig views craft\console\controllers\EnvControllerhas been removed in favor of the classes below:CraftCms\Cms\Console\Commands\Env\EnvRemoveCommand=>php craft env:removeCraftCms\Cms\Console\Commands\Env\EnvSetCommand=>php craft env:setCraftCms\Cms\Console\Commands\Env\EnvShowCommand=>php craft env:show
craft\console\controllers\IndexAssetsControllerhas been removed in favor of the classes below:CraftCms\Cms\Asset\Commands\CleanupAssetIndexesCommand=>php craft index-assets:cleanupCraftCms\Cms\Asset\Commands\IndexAllAssetsCommand=>php craft index-assets:allCraftCms\Cms\Asset\Commands\IndexOneAssetCommand=>php craft index-assets:one
craft\console\controllers\BaseSystemStatusController,craft\console\controllers\OnController, andcraft\console\controllers\OffControllerhave been removed in favor of the classes below:CraftCms\Cms\Console\Commands\System\OnCommand=>php craft on- `CraftCms\Cms\Cons...
5.9.22
- Fixed a bug where dependencies required by
composer.jsonwere getting updated when installing/updating plugins. (#18755) - Fixed a bug where element thumbnails weren’t always getting loaded when they became visible.
- Fixed a bug where two-step verification setup was working even if the user failed to re-authenticate, if they already had an elevated session. (#18753)
- Fixed a bug where changes to Table fields’ “Table Columns” settings would cause existing data to be lost, if the “Static Rows” setting was enabled. (#18764)
- Fixed a moderate-severity authorization bypass vulnerability. (GHSA-7h62-6v23-v8fm)
4.17.15
- Fixed a bug where dependencies required by
composer.jsonwere getting updated when installing/updating plugins. (#18755) - Fixed a moderate-severity authorization bypass vulnerability. (GHSA-7h62-6v23-v8fm)
5.9.21
- Fixed a bug where entries weren’t redirecting back to their section’s page’s URL by default.
- Fixed a bug where the
resourceBasePathandresourceBaseUrlconfig settings weren’t being respected for console requests. (#18685) - Fixed a bug where eager-loadable GraphQL fields could be populated with the wrong field’s results, if they followed a fragment with a
*Interfacetype condition. (#18708) - Fixed a bug where users with permission to edit entries, but not view peer entries in a section, weren’t allowed to edit the authors for entries in the section. (#18717)
- Fixed a bug where reference tags weren’t working with generated fields. (#18692)
- Fixed errors that could occur when applying project config changes. (#18720)
- Fixed a bug where it wasn’t always possible to sign into a user account that had the same email address as an inactive user. (#18723)
- Fixed a bug where relational fields’ element query results weren’t always limited to the selected relations if the
idparam was overridden. (#15570) - Fixed an error that could occur when executing a queue job. (#18739)
- Fixed high-severity authorization bypass vulnerabilities. (GHSA-x5m4-g2cq-52pq, GHSA-3w32-23wj-rxg3, GHSA-qh45-9g5p-m2v4)
- Fixed moderate-severity permission escalation vulnerabilities. (GHSA-qq2c-2q8j-jh27, GHSA-43cq-c2gq-pfpw)
4.17.14
- Fixed high-severity authorization bypass vulnerabilities. (GHSA-3w32-23wj-rxg3, GHSA-qh45-9g5p-m2v4)
5.9.20
- Fixed an issue that prevented Craft from being installed. (#18700)
- Fixed a bug where nested element cards weren’t showing validation errors. (#18690)
- Fixed a bug where read-only Matrix fields in Index mode weren’t respecting the Default Table Columns setting. (#18684)
- Fixed a bug where nested entries could be lost when reverting content from a revision. (#18691)
- Fixed a bug where nested entries weren’t getting loaded when previewing a revision, if queried with
eagerly(). (#18693)
4.17.13.1
5.9.19
- Most classes can now be instantiated via the
create()Twig function. (#18376) - Added
craft\helpers\ProjectConfig::pathDepth(). craft\services\Fields::deleteLayout()anddeleteLayoutById()now have$hardDeletearguments.- Deprecated
craft\services\ProjectConfig::getPendingChangeSummary(). - Fixed a bug where element search query caches weren’t getting invalidated when elements’ search keywords were indexed. (#18275)
- Fixed a bug where disabled sites weren’t getting loaded when running Codeception tests. (#18638)
- Fixed a bug where custom entry index page icons weren’t getting stored properly if the source name contained periods. (#18631)
- Fixed a bug where copying nested entries on a revision wasn’t working. (#18648)
- Fixed a bug where Matrix fields in Blocks view could have “Duplicate selected blocks” and “Delete selected blocks” field-level actions. (#18652)
- Fixed a bug where the submit button within Live Preview was labelled “Save” rather than “Create entry” when editing an unpublished draft. (#18579)
- Fixed a bug where recent changes could be lost when creating an element or applying a draft, if there were validation errors. (#18657)
- Fixed a bug where nested elements would get soft-deleted after running the
entrify/global-setcommand. (#18650) - Fixed a bug where the “Max Authors” section setting was visible for Single sections.
- Fixed an exception that would be thrown when attempting to access undefined keys within
craft\fields\data\JsonDataobjects from Twig. (#18656) - Fixed a bug where address cards could be missing their address preview. (#18632)
- Fixed a bug where the Save button’s spinner wouldn’t appear right away when saving a nested element in a slideout. (#18664)
- Fixed a bug where the server check script wasn’t treating GD as a requirement. (craftcms/server-check#30)
- Fixed a bug where tooltips could be instantiated multiple times within Link fields. (#18666)
- Fixed a bug where localized nested element content could be overwritten when the owner element was propagated to a new site. (#18659)
4.17.13
5.9.18
- Improved error logging when logging in with passkeys. (#18627)
- Added
craft\controllers\ElementIndexesController::$fieldLayouts. craft\services\ElementSources::getTableAttributes()now has a$fieldLayoutsargument.- Fixed a bug where GraphQL results were getting cached even if they contained transform generation URLs. (#18581)
- Fixed a bug where
aria-activedescendant,aria-flowto, andaria-ownsattributes weren’t getting namespaced by{% namespace %}tags. (#18577) - Fixed a bug where sites with missing
enabledvalues were being treated as enabled. (#18572) - Fixed a bug where GraphQL fields within fragments weren’t getting eager-loaded if the fragment’s type condition referenced an interface (e.g.
on EntryInterface) rather than a specific type name. (#18588) - Fixed a bug where relation fields were getting marked as translatable if they used a custom translation method, even if the rendered translation key was blank. (#18580)
- Fixed a bug where section and field chips in the “Used by” column of the Entry Types index page weren’t getting hyperlinked. (#18589)
- Fixed a bug where exceptions thrown when sending emails weren’t getting handled properly. (#18597)
- Fixed a bug where unordered lists weren’t getting styled correctly within Tip/Warning/Markdown field layout UI elements. (#18598)
- Fixed an error that could occur when upgrading to Craft 5. (#18576)
- Fixed a bug where nested Matrix entries’ Title fields were getting validation errors if blank, even if the nested entry was disabled. (#18611)
- Fixed an infinite recursion bug that could occur if the
loginPath,logoutPath,setPasswordPath, orverifyEmailPathconfig settings were set to a callable that called thesitesservice. (#18605) - Fixed a bug where Matrix fields in Index view mode could be missing custom field columns. (#18590)
- Fixed a JavaScript error that could occur when opening a modal. (#18612)
- Fixed a bug where element chips and cards weren’t getting refreshed when a provisional draft’s changes were discarded in a different tab.
- Fixed a bug where element attributes weren’t always updating when content changes were made.
- Fixed a bug where successive edits to nested elements were forgotten. (#18624)
- Fixed a bug where nested elements weren’t getting duplicated when a new site was added to the owner element. (#18621)
- Fixed a bug where nested entries were getting assigned new IDs if they were edited multiple times for the same owner element draft. (#18461)
- Fixed a SQL error that could occur when editing an element draft that had upstream changes. (#18626)
- Fixed a bug where custom sources’ labels weren’t being translated within the document title. (#18629)
- Fixed moderate-severity information disclosure vulnerabilities. (GHSA-gj2p-p9m4-c8gw, GHSA-33m5-hqp9-97pw)
- Fixed a moderate-severity RCE vulnerability. (GHSA-qrgm-p9w5-rrfw)