5.4.0 (unreleased)
Overview
Features and enhancements
Option to change ClassName
column from enum to varchar
On websites with very large database tables it can take a long time to run dev/build
, which can be a problem when deploying changes to production. This is because the ClassName
column is an enum
type which requires an a ALTER TABLE
query to be run affecting every row whenever there is a new valid value for the column. For a very rough benchmark, running an ALTER TABLE
query on a database table of 10 million records took 28.52 seconds on a mid-range 2023 laptop, though this time will vary depending on the database and hardware being used.
This release introduces a new configuration option to change the ClassName
column to a varchar
type which removes the need to run ALTER TABLE
whenever there is a new valid value.
Enabling this will result in a trade-off where the size of the database will increase by approximately 7 MB per 100,000 rows. There will also be a very slow initial dev/build
as all of the ClassName
columns are switched to varchar
. To enable this, add the following configuration:
SilverStripe\ORM\DataObject:
fixed_fields:
ClassName: DBClassNameVarchar
SilverStripe\ORM\FieldType\DBPolymorphicForeignKey:
composite_db:
Class: "DBClassNameVarchar('SilverStripe\\ORM\\DataObject', ['index' => false])"
Reports quality of life updates
Numerous slight adjustments have been made to the ReportAdmin
class for a better experience.
The changes include:
- Search capability added (making use of
PartialMatchFilter
) - Sorting by columns now posssible
- Default Sort is now
Title ASC
- Reports list is now paginated
Description
is now displayed in the list as a column
Other new features
- A new
BaseKernel::getBooted()
method has been added for checking whether the kernel has been booted yet or not. - A new
CoreKernel::setBootDatabase()
method has been added to replace the now deprecatedDatabaselessKernel
class. -
Two new methods have been added to
ArrayLib
:ArrayLib::insertBefore()
for inserting a value before another value in an arrayArrayLib::insertAfter()
for inserting a value after another value in an array
- A new
DBDatetime::getTimeBetween()
method has been added. This method returns the amount of time that has passed between twoDBDateTime
objects as a human-readable string. - A new
AbstractQueuedJob::getQueue()
static method has been added to get the correct queue constant from a given string or int. - New
GridFieldFilterHeader::setPlaceHolderText()
andGridFieldFilterHeader::getPlaceHolderText()
methods have been added which provide a way to override theGridFieldFilterHeader
search field placeholder text if the dynamically generated text doesn't suit your use case.
API changes
- The class names for the
TopPage
feature indnadesign/silverstripe-elemental
do not follow the correct naming convention for Silverstripe CMS. The existing classes have been deprecated and will be renamed to match the correct naming convention in a future major release. SilverStripe\ORM\ArrayLib
has been deprecated. It will be renamed toSilverStripe\Core\ArrayLib
SilverStripe\ORM\ArrayList
has been deprecated. It will be renamed toSilverStripe\Model\List\ArrayList
SilverStripe\ORM\Filterable
has been deprecated. It will be merged intoSS_List
.SilverStripe\ORM\GroupedList
has been deprecated. It will be renamed toSilverStripe\Model\List\GroupedList
SilverStripe\ORM\Limitable
has been deprecated. It will be merged intoSS_List
.SilverStripe\ORM\ListDecorator
has been deprecated. It will be renamed toSilverStripe\Model\List\ListDecorator
SilverStripe\ORM\Map
has been deprecated. It will be renamed toSilverStripe\Model\List\Map
SilverStripe\ORM\PaginatedList
has been deprecated. It will be renamed toSilverStripe\Model\List\PaginatedList
SilverStripe\ORM\Sortable
has been deprecated. It will be merged intoSS_List
.SilverStripe\ORM\SS_List
has been deprecated. It will be renamed toSilverStripe\Model\List\SS_List
SilverStripe\ORM\ValidationException
has been deprecated. It will be renamed toSilverStripe\Core\Validation\ValidationException
SilverStripe\ORM\ValidationResult
has been deprecated. It will be renamed toSilverStripe\Core\Validation\ValidationResult
SilverStripe\View\ArrayData
has been deprecated. It will be renamed toSilverStripe\Model\ArrayData
SilverStripe\View\ViewableData
has been deprecated. It will be renamed toSilverStripe\Model\ModelData
SilverStripe\View\ViewableData_Customised
has been deprecated. It will be renamed toSilverStripe\Model\ModelDataCustomised
SilverStripe\View\ViewableData_Debugger
has been deprecated. It will be renamed toSilverStripe\Model\ModelDataDebugger
CliBypass
has been deprecated. It will be removed without equivalent functionality to replace it.CliController
has been deprecated. It will be replaced withsymfony/console
commands.DatabaselessKernel
has been deprecated. UseCoreKernel::setBootDatabase()
instead.BuildTask.segment
has been deprecated. It will be replaced with a new$commandName
property.BuildTask->description
has been deprecated. It will be replaced with a new static property with the same name.BuildTask::getDescription()
has been deprecated. It will be replaced with a new static method with the same name.DevBuildController
has been deprecated. It will be replaced with a newSilverStripe\Dev\Command\DbBuild
class.DevConfigController
has been deprecated. It will be replaced with a newSilverStripe\Dev\Command\ConfigDump
class.DatabaseAdmin
has been deprecated. It will be replaced with a newSilverStripe\Dev\Command\DbBuild
class.DevelopmentAdmin::buildDefaults()
has been deprecated. It will be replaced with a newSilverStripe\Dev\Command\DbDefaults
class.DevelopmentAdmin::generatesecuretoken()
has been deprecated. It will be replaced with a newSilverStripe\Dev\Command\GenerateSecureToken
class.DevelopmentAdmin::getRegisteredController()
has been deprecated. It will be removed without equivalent functionality to replace it.DevelopmentAdmin.registered_controllers
has been deprecated. It will be replaced with newcontrollers
andcommands
configuration properties.CleanupTestDatabasesTask::canView()
has been deprecated. It will be replaced with a newcanRunInBrowser()
method.HTTPOutputHandler
has been deprecated. It will be renamed toSilverStripe\Logging\ErrorOutputHandler
Build
has been deprecated. It will be replaced with a newSilverStripe\GraphQL\Dev\SchemaBuild
class.DevelopmentAdmin
has been deprecated. It will be removed without equivalent functionality to replace it.DevBuildExtension
has been deprecated. It will be renamed toSilverStripe\GraphQL\Extensions\DbBuildExtension
LDAPGroupSyncTask::log()
has been deprecated. It will be removed without equivalent functionality to replace it.LDAPMemberSyncTask::log()
has been deprecated. It will be removed without equivalent functionality to replace it.LDAPMigrateExistingMembersTask::log()
has been deprecated. It will be removed without equivalent functionality to replace it.SubsiteCopyPagesTask::log()
has been deprecated. It will be removed without equivalent functionality to replace it.CheckExternalLinksTask::log()
has been deprecated. It will be removed without equivalent functionality to replace it.CheckExternalLinksTask::setSilent()
has been deprecated. It will be removed without equivalent functionality to replace it.CheckExternalLinksTask->silent
has been deprecated. It will be removed without equivalent functionality to replace it.RealMeSetupTask::message()
has been deprecated. It will be removed without equivalent functionality to replace it.StaticCacheFullBuildTask::log()
has been deprecated. It will be removed without equivalent functionality to replace it.ContentReviewOwnerMigrationTask
has been deprecated. It will be removed without equivalent functionality to replace it.CronTaskController
has been deprecated. It will be replaced with a newSilverStripe\CronTask\Cli\CronTaskCommand
class.Clear
has been deprecated. It will be replaced with a newSilverStripe\GraphQLDevTools\SchemaClear
class.ConvertTranslatableTask
has been deprecated. It will be removed without equivalent functionality to replace it.Exception
has been deprecated. It will be removed without equivalent functionality to replace it.UpdatePackageInfoTask->supportedAddonsLoader
has been deprecated. It will be removed without equivalent functionality to replace it.UpdatePackageInfoTask::getSupportedAddonsLoader()
has been deprecated. It will be removed without equivalent functionality to replace it.UpdatePackageInfoTask::setSupportedAddonsLoader()
has been deprecated. It will be removed without equivalent functionality to replace it.ProcessJobQueueChildTask
has been deprecated. It will be replaced with a newSymbiote\QueuedJobs\Cli\ProcessJobQueueChildCommand
class.ProcessJobQueueTask::getQueue()
has been deprecated. UseAbstractQueuedJob::getQueue()
instead.HTTPOutputHandler::isCli()
has been deprecated. UseDirector::is_cli()
instead instead.PasswordValidator
has been deprecated. It will be renamed toSilverStripe\Security\Validation\RulesPasswordValidator
.ContentReviewEmails::isValidEmail()
has been deprecated. UseEmail::is_valid_address()
instead.- The
DBField.defaultVal
property has been deprecated. UseDBField::getDefaultValue()
andDBField::setDefaultValue()
instead. DBFile::validate()
has been deprecated. UseDBFile::validateFilename()
instead.ContentController::Menu()
has been deprecated. UseContentController::getMenu()
instead if calling the method in PHP. You can continue to use$Menu
in templates, including passing arguments to it.GridFieldDataColumns::getValueFromRelation()
has been deprecated. It will be removed without equivalent functionality to replace it.ViewableData::castingClass()
has been deprecated. It will be removed without equivalent functionality to replace it.ViewableData::escapeTypeForField()
has been deprecated. It will be removed without equivalent functionality to replace it.ViewableData::objCacheName()
has been deprecated. It will be made private. The correspondingViewableData::objCacheSet()
andViewableData::objCacheGet()
methods will change method signature to not require passing in the cache key.- The
$cacheName
parameter for theViewableData::obj()
method has been deprecated. It will be removed without equivalent functionality to replace it. ViewableData::cachedCall()
has been deprecated. UseViewableData::obj()
instead.ViewableData::XML_val()
has been deprecated. It will be removed without equivalent functionality to replace it.ViewableData::getXMLValues()
has been deprecated. It will be removed without equivalent functionality to replace it.- The
$parser
parameter for theSSViewer::__construct()
method has been deprecated. It will be removed without equivalent functionality to replace it. SSViewer::flush()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::flush()
.SSViewer::fromString()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::renderString()
.SSViewer::topLevel()
has been deprecated. It will be removed without equivalent functionality to replace it.SSViewer::chooseTemplate()
has been deprecated. It will be removed without equivalent functionality to replace it.SSViewer::setTemplate()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::setTemplate()
.SSViewer::setParser()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::setParser()
.SSViewer::getParser()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::getParser()
.SSViewer::hasTemplate()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::hasTemplate()
.SSViewer::exists()
has been deprecated. It will be removed without equivalent functionality to replace it.SSViewer::getTemplateFileByType()
has been deprecated. It will be removed without equivalent functionality to replace it.SSViewer::flush_template_cache()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::flushTemplateCache()
.SSViewer::flush_cacheblock_cache()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::flushCacheBlockCache()
.SSViewer::setPartialCacheStore()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::setPartialCacheStore()
.SSViewer::getPartialCacheStore()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::getPartialCacheStore()
.SSViewer::includeGeneratedTemplate()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::includeGeneratedTemplate()
.- The
$inheritedScope
parameter for the SSViewer::process() method has been deprecated. It will be removed without equivalent functionality to replace it. SSViewer::getSubtemplateFor()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::getSubtemplateFor()
.SSViewer::parseTemplateContent()
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::parseTemplateContent()
.SSViewer::templates()
has been deprecated. It will be removed without equivalent functionality to replace it.SSViewer::setTemplateFile()
has been deprecated. It will be removed without equivalent functionality to replace it.SSViewer::get_base_tag()
has been deprecated. UseSSViewer::getBaseTag()
instead.SSViewer_DataPresenter
has been deprecated. It will be merged back intoSSViewer_Scope
.SSViewer_FromString
has been deprecated. It will be replaced withSilverStripe\View\SSTemplateEngine::renderString()
.SSViewer_Scope::getItem()
has been deprecated. UseSSViewer_Scope::getCurrentItem()
instead.SSViewer_Scope::obj()
has been deprecated. It will be renamedscopeToIntermediateValue()
.SSViewer::execute_template()
has been deprecated. It will be removed without equivalent functionality to replace it.SSViewer::execute_string()
has been deprecated. It will be removed without equivalent functionality to replace it.ThemeResourceLoader::findTemplate()
has been deprecated. It will be removed without equivalent functionality to replace it.FlushMiddleware
has been deprecated. It will be replaced with flushing inside the Kernel directly.
Bug fixes
This release includes a number of bug fixes to improve a broad range of areas. Check the change logs for full details of these fixes split by module. Thank you to the community members that helped contribute these fixes as part of the release!