CraftCMS v3.6.0 Release Notes

Release Date: 2021-01-26 // over 3 years ago
  • ⚑️ > {warning} Read through the Upgrading to Craft 3.6 guide before updating.

    βž• Added

    • πŸ‘ Craft now supports PHP 8. (#7050)
    • Craft now requires PHP 7.2.5 or later.
    • πŸ”Œ Commercial plugins now receive license keys automatically when installed as trials.
    • πŸ”Œ It’s now possible for admins to purchase Craft and plugin licenses when allowAdminChanges is disabled.
    • πŸ”Œ It’s now possible to browse the Plugin Store when allowAdminChanges is disabled.
    • βž• Added tablet and phone viewport emulation to Live Preview (Craft Pro only.) (#1006)
    • Entries now begin life as β€œunpublished drafts” rather than β€œunsaved drafts”. They are no longer ephemeral; they will continue to exist until explicitly published or deleted. (#5661, #7216)
    • It’s now possible to delete entries for a specific site, if their section’s propagation method is set to β€œLet each entry choose which sites it should be saved to”. (#7190)
    • βž• Added the β€œCopy impersonation URL” user action, which generates a URL that can be pasted into a private window to impersonate the user without losing the current session. (#7281)
    • πŸ‘‰ User indexes can now include a β€œGroups” column. (#7211)
    • 🌐 Volumes now have β€œTitle Translation Method” and β€œTitle Translation Key Format” settings, like entry types. (#7135)
    • It’s now possible to set sites’ Name settings to environment variables.
    • URL fields now have an β€œAllowed URL Types” setting, which adds the ability to accept telephone and email URLs. (#5497)
    • βž• Added the β€œCaptions/Subtitles” file kind. (#7304)
    • βž• Added the users/list-admins and users/set-password commands. (#7067)
    • βž• Added the disableGraphqlTransformDirective config setting. (#6466)
    • βž• Added the enableGraphqlIntrospection config setting. (#6466)
    • βž• Added the handleCasing config setting, which determines the default casing that should be used when autogenerating component handles. (#4276)
    • βž• Added the maxGraphqlComplexity config setting. (#6466)
    • βž• Added the maxGraphqlDepth config setting. (#6466)
    • βž• Added the maxGraphqlResults config setting. (#6466)
    • βž• Added the rasterizeSvgThumbs config setting. (#7146)
    • βž• Added the sanitizeCpImageUploads config setting, which determines whether images uploaded via the control panel should be sanitized. (#3060)
    • βž• Added the {% tag %} Twig tag.
    • βž• Added the withGroups user query param.
    • βž• Added the relatedToAssets, relatedToCategories, relatedToEntries, relatedToTags, and relatedToUsers arguments to GraphQL queries. (#7110)
    • βž• Added the isUnpublishedDraft GraphQL field.
    • βž• Added craft\base\ApplicationTrait::getFormattingLocale(), which returns the locale that should be used for date/time formatting.
    • βž• Added craft\base\ElementExporterInterface::isFormattable().
    • βž• Added craft\base\ElementInterface::getIsUnpublishedDraft().
    • βž• Added craft\base\FieldInterface::includeInGqlSchema(). (#7244)
    • βž• Added craft\base\FieldInterface::useFieldset(), which custom fields can override to return true if a <fieldset> and <legend> should be used, rather than a <div> and <label>.
    • βž• Added craft\base\VolumeInterface::createDirectory().
    • βž• Added craft\base\VolumeInterface::deleteDirectory().
    • βž• Added craft\base\VolumeInterface::getDateModified().
    • βž• Added craft\base\VolumeInterface::getFileSize().
    • βž• Added craft\base\VolumeInterface::renameDirectory().
    • βž• Added craft\base\VolumeTrait::$titleTranslationKeyFormat.
    • βž• Added craft\base\VolumeTrait::$titleTranslationMethod.
    • βž• Added craft\console\Controller::passwordPrompt().
    • βž• Added craft\console\Request::getHadToken().
    • βž• Added craft\console\Request::getSiteToken().
    • βž• Added craft\console\Request::setToken().
    • βž• Added craft\controllers\BaseEntriesController::enforceDeleteEntryPermissions().
    • βž• Added craft\elements\db\ElementQueryInterface::afterPopulate().
    • βž• Added craft\elements\db\ElementQueryInterface::createElement().
    • Added craft\elements\Entry::EVENT_DEFINE_ENTRY_TYPES. (#7136)
    • βž• Added craft\elements\Entry::getAvailableEntryTypes().
    • βž• Added craft\events\CreateFieldLayoutFormEvent.
    • βž• Added craft\events\DefineEntryTypesEvent.
    • βž• Added craft\events\RegisterGqlArgumentHandlersEvent.
    • βž• Added craft\events\SearchEvent::$results. (#7237)
    • βž• Added craft\fieldlayoutelements\AssetTitleField.
    • βž• Added craft\fieldlayoutelements\BaseField::useFieldset().
    • βž• Added craft\fields\Url::TYPE_EMAIL.
    • βž• Added craft\fields\Url::TYPE_TEL.
    • βž• Added craft\fields\Url::TYPE_URL.
    • βž• Added craft\gql\ArgumentManager.
    • βž• Added craft\gql\base\ArgumentHandler.
    • βž• Added craft\gql\base\ArgumentHandlerInterface.
    • βž• Added craft\gql\base\Generator.
    • βž• Added craft\gql\base\RelationArgumentHandler.
    • βž• Added craft\gql\ElementQueryConditionBuilder::setArgumentManager().
    • βž• Added craft\gql\handlers\RelatedAssets.
    • βž• Added craft\gql\handlers\RelatedCategories.
    • βž• Added craft\gql\handlers\RelatedEntries.
    • βž• Added craft\gql\handlers\RelatedTags.
    • βž• Added craft\gql\handlers\RelatedUsers.
    • βž• Added craft\gql\types\input\criteria\Asset.
    • βž• Added craft\gql\types\input\criteria\Category.
    • βž• Added craft\gql\types\input\criteria\Entry.
    • βž• Added craft\gql\types\input\criteria\Tag.
    • βž• Added craft\gql\types\input\criteria\User.
    • βž• Added craft\helpers\App::createFormattingLocale().
    • βž• Added craft\helpers\App::phpSizeToBytes().
    • βž• Added craft\helpers\Cp::checkboxFieldHtml().
    • βž• Added craft\helpers\Cp::checkboxSelectFieldHtml().
    • βž• Added craft\helpers\Cp::colorFieldHtml().
    • βž• Added craft\helpers\Cp::editableTableFieldHtml().
    • βž• Added craft\helpers\Cp::lightswitchFieldHtml().
    • βž• Added craft\helpers\Cp::renderTemplate().
    • βž• Added craft\helpers\Cp::selectFieldHtml().
    • βž• Added craft\helpers\Cp::selectHtml().
    • βž• Added craft\helpers\Cp::textareaFieldHtml().
    • βž• Added craft\helpers\Cp::textFieldHtml().
    • βž• Added craft\helpers\Diff.
    • βž• Added craft\helpers\Gql::eagerLoadComplexity().
    • βž• Added craft\helpers\Gql::nPlus1Complexity().
    • βž• Added craft\helpers\Gql::singleQueryComplexity().
    • βž• Added craft\helpers\Template::paginateQuery().
    • βž• Added craft\i18n\I18N::validateAppLocaleId().
    • βž• Added craft\i18n\Locale::setDateTimeFormats(). (#7394)
    • βž• Added craft\log\Dispatcher.
    • Added craft\models\FieldLayout::EVENT_CREATE_FORM. (#7258)
    • βž• Added craft\models\Site::getName().
    • βž• Added craft\models\Site::setBaseUrl().
    • βž• Added craft\models\Site::setName().
    • βž• Added craft\mutex\MysqlMutex.
    • βž• Added craft\mutex\PgsqlMutex.
    • βž• Added craft\services\Assets::$generatePendingTransformsViaQueue. (#7360)
    • Added craft\services\Drafts::EVENT_AFTER_APPLY_DRAFT.
    • Added craft\services\Drafts::EVENT_BEFORE_APPLY_DRAFT.
    • βž• Added craft\services\Drafts::publishDraft().
    • βž• Added craft\services\Globals::deleteSet().
    • βž• Added craft\services\Globals::reset().
    • Added craft\services\Gql::GRAPHQL_COMPLEXITY_CPU_HEAVY.
    • Added craft\services\Gql::GRAPHQL_COMPLEXITY_EAGER_LOAD.
    • Added craft\services\Gql::GRAPHQL_COMPLEXITY_NPLUS1.
    • Added craft\services\Gql::GRAPHQL_COMPLEXITY_QUERY.
    • Added craft\services\Gql::GRAPHQL_COMPLEXITY_SIMPLE_FIELD.
    • βž• Added craft\services\Structures::applyBranchLimitToElements().
    • βž• Added craft\services\Structures::fillGapsInElements().
    • βž• Added craft\test\ActiveFixture.
    • βž• Added craft\test\DbFixtureTrait.
    • βž• Added craft\test\fixtures\elements\BaseContentFixture.
    • βž• Added craft\test\fixtures\elements\BaseElementFixture.
    • βž• Added craft\test\TestSetup::SITE_URL.
    • βž• Added craft\validators\UrlValidator::URL_PATTERN.
    • βž• Added craft\web\Request::getHadToken().
    • βž• Added craft\web\Request::getSiteToken().
    • βž• Added craft\web\Request::setToken().
    • βž• Added the Craft.index() JavaScript method.

    πŸ”„ Changed

    • Relational fields now include all related elements’ titles as search keywords, including disabled elements. (#7079)
    • πŸ‘Œ Improved the performance of project config change diffs. (#7218)
    • πŸ‘Œ Improved the accessibility of info icons.
    • Checkbox and radio button group fields now use <fieldset>s and <legend>s throughout the control panel.
    • Field containers no longer set the aria-describedby attribute, leaving it up to the actual inputs to do so. (#7365)
    • Number field settings and input values are now fully formatted, unless the Preview Format setting is set to β€œUnformatted”.
    • πŸ”Œ The Settings β†’ Plugin page now shows which developer created each plugin. (#7254)
    • Field layout designers will no longer create a new tab if no tab name is entered in the prompt. (#7333)
    • Site URLs that are generated on the front-end of disabled sites now include the siteToken param, if one was passed to the current page. (#7264)
    • πŸ”’ Mutex lock names are now prefixed with the application ID, to avoid lock conflicts if two Craft installs shared the same database. (#7384)
    • Action URLs are now always based on the control panel URL when running Craft in headless mode. (#5553)
    • βͺ Renamed the backup and restore commands to db/backup and db/restore. (#7023)
    • The migrate/all command now lists the migrations that will be applied. (#7381)
    • The project-config/apply command now displays a list of changes it is applying. (#7235)
    • 0️⃣ The allowedFileExtensions config setting now includes several file extensions used by caption and subtitle file formats by default. (#7304)
    • When applying project config changes, Craft now installs new plugins before uninstalling removed plugins. (#7436)
    • The currency, filesize, number, percentage, and timestamp Twig filters now return the passed-in value verbatim if it wasn’t a valid number.
    • The withoutKey Twig filter can now accept an array, for removing multiple keys at once. (#7230)
    • 🌲 It’s now possible to add new log targets by overriding components.log.targets in config/app.php, rather than the entire log component config.
    • The _includes/forms/field.html control panel template and craft\helpers\Cp::fieldHtml() now accept a fieldset variable/config key, which can be set to true to cause the resulting field to be a <fieldset> instead of a <div>, and the label to be a <legend> instead of a <label>.
    • The _includes/forms/field.html control panel template and craft\helpers\Cp::fieldHtml() now accept an instructionsPosition variable/config key, which can be set to 'after' to cause the field instructions to be rerdered after the input instead of before.
    • The _includes/forms/field.html control panel template and craft\helpers\Cp::fieldHtml() now accept a fieldLabel variable/config key, which will take precedence over label.
    • The checkboxField macro within the _includes/forms.html control panel template now returns a <fieldset> if a fieldLabel config key was passed.
    • πŸ’» craft\base\ElementExporterInterface::export() can now return raw response data, a callable, or a resource, if isFormattable() returns false. If a callable or resource is returned, it will be streamed to the browser. (#7148)
    • πŸ“œ craft\behaviors\EnvAttributeParserBehavior::$attributes can now be set to an array with key/value pairs, where the key is the attribute name, and the value is the raw (unparsed) value, or a callable that returns the raw value.
    • πŸ“œ craft\behaviors\EnvAttributeParserBehavior::$attributes can now be set to an array with key/value pairs, where the key is the attribute name, and the value is the raw (unparsed) value, or a callable that returns the raw value.
    • craft\db\Connection::getPrimaryKeyName(), getForeignKeyName(), and getIndexName() now generate completely random object names, rather than basing them on a table name, etc. (#7153)
    • craft\base\ApplicationTrait::getLocale() now returns the same locale that the application language is set to.
    • πŸ›  craft\helpers\Cp::fieldHtml() now accepts a control panel template path, prefixed with template:.
    • 🍱 craft\helpers\Gql::isSchemaAwareOf(), extractAllowedEntitiesFromSchema(), canSchema(), extractEntityAllowedActions(), canMutateEntries(), canMutateTags(), canMutateGlobalSets(), canMutateCategories(), canMutateAssets(), canQueryEntries(), canQueryAssets(), canQueryCategories(), canQueryTags(), canQueryGlobalSets(), and canQueryUsers() now have $schema arguments.
    • πŸ“œ craft\models\Site::$baseUrl is now a magic property, which returns the parsed base URL. (#3964)
    • πŸ“œ craft\models\Site::$name is now a magic property, which returns the parsed site name. (#3964)
    • πŸ“œ craft\models\Site::getBaseUrl() now has a $parse argument, which can be set to false to return the raw (unparsed) base URL.
    • craft\services\Composer::install() no longer has an $allowlist argument.
    • craft\services\Gql::getValidationRules() now has an $isIntrospectionQuery argument.
    • Craft.formatNumber() and other D3-based number formatting now uses a dynamically-generated locale definition based on info pulled from the application’s formatting locale. (#7341)
    • πŸ—„ Craft no longer reports PHP deprecation errors.
    • πŸ‘» Exception JSON responses now include exception, file, line, and trace keys. (#7406)
    • πŸ‘ GraphQL queries now support eager-loading for arguments provided as input objects.
    • βœ… Made it easier to extend Craft’s Codeception testing module with custom code. (#7339)
    • ⚑️ Updated Yii to 2.0.40.
    • ⚑️ Updated Guzzle to 7.x, for projects that don’t have any plugins that require Guzzle 6. (#6997)
    • ⚑️ Updated Composer to 2.0.8.
    • ⚑️ Updated LitEmoji to 2.x.
    • ⚑️ Updated the Symfony Yaml component to 5.x.
    • ⚑️ Updated svg-sanitizer to 0.14.
    • ⚑️ Updated webonyx/graphql-php to 14.x.

    πŸ—„ Deprecated

    • βͺ Deprecated the backup and restore commands.
    • πŸ—„ Deprecated the purgeUnsavedDraftsDuration config setting.
    • πŸ—„ Deprecated the siteName config setting. Sites’ Name settings should be set to environment variables instead.
    • πŸ—„ Deprecated the siteUrl config setting. Sites’ Base URL settings should be set to aliases or environment variables instead. (#3205)
    • πŸ—„ Deprecated the relatedToAll GraphQL query argument. relatedTo: ["and", ...ids] should be used instead.
    • πŸ—„ Deprecated the isUnsavedDraft GraphQL field.
    • πŸ—„ Deprecated craft\base\Element::getIsUnsavedDraft(). getIsUnpublishedDraft() should be used instead.
    • πŸ—„ Deprecated craft\base\VolumeInterface::createDir(). createDirectory() should be used instead.
    • πŸ—„ Deprecated craft\base\VolumeInterface::deleteDir(). deleteDirectory() should be used instead.
    • πŸ“‡ Deprecated craft\base\VolumeInterface::getFileMetadata(). getFileSize() and getDateModified() should be used instead.
    • πŸ—„ Deprecated craft\base\VolumeInterface::renameDir(). renameDirectory() should be used instead.
    • πŸ—„ Deprecated craft\db\Connection::trimObjectName().
    • πŸ—„ Deprecated craft\gql\base\Resolver::getArrayableArguments().
    • πŸ—„ Deprecated craft\gql\base\Resolver::prepareArguments().
    • πŸ—„ Deprecated craft\helpers\App::logConfig().
    • πŸ—„ Deprecated craft\helpers\Template::paginateCriteria(). paginateQuery() should be used instead.
    • πŸ—„ Deprecated craft\services\Categories::applyBranchLimitToCategories(). craft\services\Structures::applyBranchLimitToElements() should be used instead.
    • πŸ—„ Deprecated craft\services\Categories::fillGapsInCategories(). craft\services\Structures::fillGapsInElements() should be used instead.
    • πŸ—„ Deprecated craft\services\Composer::$disablePackagist.
    • πŸ—„ Deprecated craft\services\Drafts::applyDraft(). publishDraft() should be used instead.
    • Deprecated craft\services\Drafts::EVENT_AFTER_APPLY_DRAFT. EVENT_AFTER_PUBLISH_DRAFT should be used instead.
    • Deprecated craft\services\Drafts::EVENT_BEFORE_APPLY_DRAFT. EVENT_BEFORE_PUBLISH_DRAFT should be used instead.
    • πŸ—„ Deprecated craft\services\Drafts::purgeUnsavedDrafts().
    • βœ… Deprecated craft\test\Fixture. craft\test\ActiveFixture should be used instead.
    • πŸ—„ Deprecated craft\web\View::$minifyCss.
    • πŸ—„ Deprecated craft\web\View::$minifyJs.
    • πŸ—„ Deprecated craft\web\View::renderTemplateMacro().

    βœ‚ Removed

    • βœ‚ Removed the β€œPlaceholder” setting from URL fields. (#7303)
    • βœ‚ Removed craft\controllers\ElementIndexesController::actionCreateExportToken().
    • βœ‚ Removed craft\controllers\ExportController.
    • βœ‚ Removed craft\services\Api::getComposerWhitelist().
    • βœ‚ Removed craft\test\fixtures\elements\ElementFixture. craft\test\fixtures\elements\BaseElementFixture or BaseContentFixture should be used instead.
    • βœ‚ Removed craft\test\fixtures\FieldLayoutFixture::deleteAllByFieldHandle().
    • βœ‚ Removed craft\test\fixtures\FieldLayoutFixture::extractTabsFromFieldLayout().
    • βœ‚ Removed craft\test\fixtures\FieldLayoutFixture::getTabsForFieldLayout().
    • βœ‚ Removed craft\test\fixtures\FieldLayoutFixture::linkFieldToLayout().
    • βœ‚ Removed Minify and jsmin-php.

    πŸ›  Fixed

    • πŸ›  Fixed an error that occurred when a schema change was made within a transaction, if using MySQL and PHP 8. (#7174)
    • πŸ›  Fixed a bug where asset queries’ withTransforms param wasn’t being respected for eager-loaded assets. (#6140)
    • πŸ›  Fixed a bug where craft\db\Connection::getPrimaryKeyName(), getForeignKeyName(), and getIndexName() could generate non-unique object names. (#7153)
    • πŸ›  Fixed a bug where number strings were not correctly typecast to the right PHP numeric type when using the Number GraphQL type.
    • πŸ›  Fixed a bug where it wasn’t possible to save a Global set with a predefined UID.
    • πŸ›  Fixed a bug where craft\helpers\Db::prepareValuesForDb() would omit or JSON-encode DateTime objects, depending on the PHP version, rather than converting them to ISO-8601-formatted strings.
    • πŸ›  Fixed a bug where info icons’ content was focusable before the icon was activated. (#7257)
    • πŸ›  Fixed a bug where generated URLs would include the token from the current request, even if it had expired or met its usage limit.
    • πŸ›  Fixed a bug where Number field settings and input values could be stored incorrectly if the user’s formatting locale used a different decimal character that the application language.
    • πŸ›  Fixed a MySQL deadlock error that could occur when running background jobs. (#7179)

    πŸ”’ Security

    • 0️⃣ The default allowedFileExtensions config setting value no longer includes htm or html.