SilentConfigurationUpgradeService

Execute "silent" LocalConfiguration upgrades if needed.

Some LocalConfiguration settings are obsolete or changed over time. This class handles upgrades of these settings. It is called by the step controller at an early point.

Every change is encapsulated in one method and must throw a ConfigurationChangedException if new data is written to LocalConfiguration. This is caught by above step controller to initiate a redirect and start again with adapted configuration.

Internal

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Table of Contents

Properties

$configurationManager  : ConfigurationManager
$obsoleteLocalConfigurationSettings  : array<string|int, mixed>
List of obsolete configuration options in LocalConfiguration to be removed Example: // #forge-ticket 'BE/somesetting',

Methods

__construct()  : mixed
execute()  : mixed
Executed configuration upgrades. Single upgrade methods must throw a ConfigurationChangedException if something was written to LocalConfiguration.
disableImageMagickDetailSettingsIfImageMagickIsDisabled()  : mixed
Detail configuration of Image Magick settings must be cleared if Image Magick handling is disabled.
generateEncryptionKeyIfNeeded()  : mixed
The encryption key is crucial for securing form tokens and the whole TYPO3 link rendering later on. A random key is set here in LocalConfiguration if it does not exist yet. This might possible happen during upgrading and will happen during first install.
migrateCacheHashOptions()  : mixed
Migrate single cache hash related options under "FE" into "FE/cacheHash"
migrateCachingFrameworkCaches()  : mixed
Renames all SYS[caching][cache] configuration names to names without the prefix "cache_".
migrateDatabaseConnectionCharset()  : mixed
Migrate the configuration setting DB/Connections/Default/charset to 'utf8' as 'utf-8' is not supported by all MySQL versions.
migrateDatabaseConnectionSettings()  : mixed
Move the database connection settings to a "Default" connection
migrateDatabaseDriverOptions()  : mixed
Migrate the configuration setting DB/Connections/Default/driverOptions to array type.
migrateDisplayErrorsSetting()  : mixed
Migrate SYS/displayErrors to not contain 2
migrateExceptionErrors()  : mixed
Migrate SYS/exceptionalErrors to not contain E_USER_DEPRECATED
migrateExplicitADmode()  : void
The default in DefaultConfiguration for BE/explicitADmode changed from explicitDeny to explicitAllow. This upgrade checks if there is any value in LocalConfiguration yet, and sets it to explicitDeny if not, to stay b/w compatible for affected instances that used the old default from DefaultConfiguration before.
migrateImageProcessorSetting()  : mixed
Migrate the definition of the image processor from the configuration value im_version_5 to the setting processor.
migrateLangDebug()  : mixed
Migrate the configuration setting BE/lang/debug if set in the LocalConfiguration.php file
migrateLockSslSetting()  : mixed
Migrate the configuration setting BE/lockSSL to boolean if set in the LocalConfiguration.php file
migrateMailSettingsToSendmail()  : mixed
Migrates "mail" to "sendmail" as "mail" (PHP's built-in mail() method) is not supported anymore with Symfony components.
migrateMailSmtpEncryptSetting()  : mixed
Migrates MAIL/transport_smtp_encrypt to a boolean value See #91070, #90295, #88643 and https://github.com/symfony/symfony/commit/5b8c4676d059
migrateSaltedPasswordsSettings()  : mixed
Migrate salted passwords extension configuration settings to BE/passwordHashing and FE/passwordHashing
migrateThumbnailsPngSetting()  : mixed
Migrate the configuration value thumbnails_png to a boolean value.
removeObsoleteLocalConfigurationSettings()  : mixed
Some settings in LocalConfiguration vanished in DefaultConfiguration and have no impact on the core anymore.
setImageMagickDetailSettings()  : mixed
Detail configuration of Image Magick and Graphics Magick settings depending on main values.
throwConfigurationChangedException()  : mixed
Throw exception after configuration change to trigger a redirect.
transferHttpSettings()  : mixed
Parse old curl and HTTP options and set new HTTP options, related to Guzzle

Properties

$obsoleteLocalConfigurationSettings

List of obsolete configuration options in LocalConfiguration to be removed Example: // #forge-ticket 'BE/somesetting',

protected array<string|int, mixed> $obsoleteLocalConfigurationSettings = [ // #72400 'BE/spriteIconGenerator_handler', // #72417 'SYS/lockingMode', // #72473 'FE/secureFormmail', 'FE/strictFormmail', 'FE/formmailMaxAttachmentSize', // #72337 'SYS/t3lib_cs_utils', 'SYS/t3lib_cs_convMethod', // #72604 'SYS/maxFileNameLength', // #72602 'BE/unzip_path', // #72615 'BE/notificationPrefix', // #72616 'BE/XCLASS', 'FE/XCLASS', // #43085 'GFX/image_processing', // #70056 'SYS/curlUse', 'SYS/curlProxyNTLM', 'SYS/curlProxyServer', 'SYS/curlProxyTunnel', 'SYS/curlProxyUserPass', 'SYS/curlTimeout', // #75355 'BE/niceFlexFormXMLtags', 'BE/compactFlexFormXML', // #75625 'SYS/clearCacheSystem', // #77411 'SYS/caching/cacheConfigurations/extbase_typo3dbbackend_tablecolumns', // #77460 'SYS/caching/cacheConfigurations/extbase_typo3dbbackend_queries', // #79513 'FE/lockHashKeyWords', 'BE/lockHashKeyWords', // #78835 'SYS/cookieHttpOnly', // #71095 'BE/lang', // #80050 'FE/cHashIncludePageId', // #80711 'FE/noPHPscriptInclude', 'FE/maxSessionDataSize', // #82162 'SYS/enable_errorDLOG', 'SYS/enable_exceptionDLOG', // #82377 'EXT/allowSystemInstall', // #82421 'SYS/sqlDebug', 'SYS/no_pconnect', 'SYS/setDBinit', 'SYS/dbClientCompress', // #82430 'SYS/syslogErrorReporting', // #82639 'SYS/enable_DLOG', 'SC_OPTIONS/t3lib/class.t3lib_userauth.php/writeDevLog', 'SC_OPTIONS/t3lib/class.t3lib_userauth.php/writeDevLogBE', 'SC_OPTIONS/t3lib/class.t3lib_userauth.php/writeDevLogFE', // #82438 'SYS/enableDeprecationLog', // #82680 'GFX/png_truecolor', // #82803 'FE/content_doktypes', // #83081 'BE/fileExtensions', // #83768 'SYS/doNotCheckReferer', // #83878 'SYS/isInitialInstallationInProgress', 'SYS/isInitialDatabaseImportDone', // #84810 'BE/explicitConfirmationOfTranslation', // #87482 'EXT/extConf', // #87767 'SYS/recursiveDomainSearch', // #88376 'FE/pageNotFound_handling', 'FE/pageNotFound_handling_statheader', 'FE/pageNotFound_handling_accessdeniedheader', 'FE/pageUnavailable_handling', 'FE/pageUnavailable_handling_statheader', // #88458 'FE/get_url_id_token', // #88500 'BE/RTE_imageStorageDir', // #89645 'SYS/systemLog', 'SYS/systemLogLevel', // #91974 'FE/IPmaskMountGroups', // #87301 'SYS/cookieSecure', // #92940 'BE/lockBeUserToDBmounts', // #92941 'BE/enabledBeUserIPLock', // #94312 'BE/loginSecurityLevel', 'FE/loginSecurityLevel', // #94871 'SYS/features/form.legacyUploadMimeTypes', ]

Methods

execute()

Executed configuration upgrades. Single upgrade methods must throw a ConfigurationChangedException if something was written to LocalConfiguration.

public execute() : mixed
Tags
throws
ConfigurationChangedException

disableImageMagickDetailSettingsIfImageMagickIsDisabled()

Detail configuration of Image Magick settings must be cleared if Image Magick handling is disabled.

protected disableImageMagickDetailSettingsIfImageMagickIsDisabled() : mixed

"Configuration presets" in install tool is not type safe, so value comparisons here are not type safe too, to not trigger changes to LocalConfiguration again.

Tags
throws
ConfigurationChangedException

generateEncryptionKeyIfNeeded()

The encryption key is crucial for securing form tokens and the whole TYPO3 link rendering later on. A random key is set here in LocalConfiguration if it does not exist yet. This might possible happen during upgrading and will happen during first install.

protected generateEncryptionKeyIfNeeded() : mixed
Tags
throws
ConfigurationChangedException

migrateCachingFrameworkCaches()

Renames all SYS[caching][cache] configuration names to names without the prefix "cache_".

protected migrateCachingFrameworkCaches() : mixed

see #88366

migrateDatabaseConnectionCharset()

Migrate the configuration setting DB/Connections/Default/charset to 'utf8' as 'utf-8' is not supported by all MySQL versions.

protected migrateDatabaseConnectionCharset() : mixed
Tags
throws
ConfigurationChangedException

migrateDatabaseConnectionSettings()

Move the database connection settings to a "Default" connection

protected migrateDatabaseConnectionSettings() : mixed
Tags
throws
ConfigurationChangedException

migrateDatabaseDriverOptions()

Migrate the configuration setting DB/Connections/Default/driverOptions to array type.

protected migrateDatabaseDriverOptions() : mixed
Tags
throws
ConfigurationChangedException

migrateExplicitADmode()

The default in DefaultConfiguration for BE/explicitADmode changed from explicitDeny to explicitAllow. This upgrade checks if there is any value in LocalConfiguration yet, and sets it to explicitDeny if not, to stay b/w compatible for affected instances that used the old default from DefaultConfiguration before.

protected migrateExplicitADmode() : void
Tags
see

#94721

migrateImageProcessorSetting()

Migrate the definition of the image processor from the configuration value im_version_5 to the setting processor.

protected migrateImageProcessorSetting() : mixed
Tags
throws
ConfigurationChangedException

migrateLockSslSetting()

Migrate the configuration setting BE/lockSSL to boolean if set in the LocalConfiguration.php file

protected migrateLockSslSetting() : mixed
Tags
throws
ConfigurationChangedException

migrateMailSettingsToSendmail()

Migrates "mail" to "sendmail" as "mail" (PHP's built-in mail() method) is not supported anymore with Symfony components.

protected migrateMailSettingsToSendmail() : mixed

See #88643

migrateMailSmtpEncryptSetting()

Migrates MAIL/transport_smtp_encrypt to a boolean value See #91070, #90295, #88643 and https://github.com/symfony/symfony/commit/5b8c4676d059

protected migrateMailSmtpEncryptSetting() : mixed

migrateSaltedPasswordsSettings()

Migrate salted passwords extension configuration settings to BE/passwordHashing and FE/passwordHashing

protected migrateSaltedPasswordsSettings() : mixed
Tags
throws
ConfigurationChangedException

removeObsoleteLocalConfigurationSettings()

Some settings in LocalConfiguration vanished in DefaultConfiguration and have no impact on the core anymore.

protected removeObsoleteLocalConfigurationSettings() : mixed

To keep the configuration clean, those old settings are just silently removed from LocalConfiguration if set.

Tags
throws
ConfigurationChangedException

setImageMagickDetailSettings()

Detail configuration of Image Magick and Graphics Magick settings depending on main values.

protected setImageMagickDetailSettings() : mixed

"Configuration presets" in install tool is not type safe, so value comparisons here are not type safe too, to not trigger changes to LocalConfiguration again.

Tags
throws
ConfigurationChangedException

throwConfigurationChangedException()

Throw exception after configuration change to trigger a redirect.

protected throwConfigurationChangedException() : mixed
Tags
throws
ConfigurationChangedException

        
On this page

Search results