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
andusers/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
, andrelatedToUsers
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 returntrue
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
andrestore
commands todb/backup
anddb/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
, andtimestamp
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
inconfig/app.php
, rather than the entirelog
component config. - The
_includes/forms/field.html
control panel template andcraft\helpers\Cp::fieldHtml()
now accept afieldset
variable/config key, which can be set totrue
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 andcraft\helpers\Cp::fieldHtml()
now accept aninstructionsPosition
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 andcraft\helpers\Cp::fieldHtml()
now accept afieldLabel
variable/config key, which will take precedence overlabel
. - The
checkboxField
macro within the_includes/forms.html
control panel template now returns a<fieldset>
if afieldLabel
config key was passed. - π»
craft\base\ElementExporterInterface::export()
can now return raw response data, a callable, or a resource, ifisFormattable()
returnsfalse
. 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()
, andgetIndexName()
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 withtemplate:
. - π±
craft\helpers\Gql::isSchemaAwareOf()
,extractAllowedEntitiesFromSchema()
,canSchema()
,extractEntityAllowedActions()
,canMutateEntries()
,canMutateTags()
,canMutateGlobalSets()
,canMutateCategories()
,canMutateAssets()
,canQueryEntries()
,canQueryAssets()
,canQueryCategories()
,canQueryTags()
,canQueryGlobalSets()
, andcanQueryUsers()
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 tofalse
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
, andtrace
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
andrestore
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()
andgetDateModified()
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
orBaseContentFixture
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()
, andgetIndexName()
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-encodeDateTime
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 includeshtm
orhtml
.