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

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

Methods

__construct()  : mixed
execute()  : void
Executed configuration upgrades. Single upgrade methods must throw a ConfigurationChangedException if something was written to LocalConfiguration.
disableImageMagickDetailSettingsIfImageMagickIsDisabled()  : void
Detail configuration of Image Magick settings must be cleared if Image Magick handling is disabled.
generateEncryptionKeyIfNeeded()  : void
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 happen during upgrading and will happen during first install.
migrateCacheHashOptions()  : void
Migrate single cache hash related options under "FE" into "FE/cacheHash"
migrateCachingFrameworkCaches()  : void
Renames all SYS[caching][cache] configuration names to names without the prefix "cache_".
migrateDatabaseConnectionCharset()  : void
Migrate the configuration setting DB/Connections/Default/charset to 'utf8' as 'utf-8' is not supported by all MySQL versions.
migrateDatabaseConnectionSettings()  : void
Move the database connection settings to a "Default" connection
migrateDatabaseDriverOptions()  : void
Migrate the configuration setting DB/Connections/Default/driverOptions to array type.
migrateDisplayErrorsSetting()  : void
Migrate SYS/displayErrors to not contain 2
migrateExceptionErrors()  : void
Migrate SYS/exceptionalErrors to not contain E_USER_DEPRECATED
migrateImageProcessorSetting()  : void
Migrate the definition of the image processor from the configuration value im_version_5 to the setting processor.
migrateLockSslSetting()  : void
Migrate the configuration setting BE/lockSSL to boolean if set in the system/settings.php file
migrateMailSettingsToSendmail()  : void
Migrates "mail" to "sendmail" as "mail" (PHP's built-in mail() method) is not supported anymore with Symfony components.
migrateMailSmtpEncryptSetting()  : void
Migrates MAIL/transport_smtp_encrypt to a boolean value See #91070, #90295, #88643 and https://github.com/symfony/symfony/commit/5b8c4676d059
migrateSaltedPasswordsSettings()  : void
Migrate salted passwords extension configuration settings to BE/passwordHashing and FE/passwordHashing
migrateVersionNumberInFileNameSetting()  : void
Migrate [FE][versionNumberInFilename] to become a boolean flag
removeDefaultColorspaceSettings()  : void
Remove the colorspace setting if it's already the recommended default for a given processor
removeObsoleteLocalConfigurationSettings()  : void
Some settings in LocalConfiguration vanished in DefaultConfiguration and have no impact on the core anymore.
setImageMagickDetailSettings()  : void
Detail configuration of Image Magick and Graphics Magick settings depending on main values.
throwConfigurationChangedException()  : void
Throw exception after configuration change to trigger a redirect.
transferHttpSettings()  : void
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', // #96550 'SYS/USdateFormat', // #96982 'EXT/allowGlobalInstall', // #96988 'EXT/allowLocalInstall', // #97265 'BE/explicitADmode', // #98179 'BE/interfaces', // Please note that further migrations in this file are kept in order to remove the setting at the very end // #97797 'GFX/processor_path_lzw', // #98503 'SYS/caching/cacheConfigurations/pagesection', // #99075 'FE/defaultUserTSconfig', // #101037 'BE/languageDebug', 'BE/lang/debug', // #101793 'BE/checkStoredRecords', 'BE/checkStoredRecordsLoose', // #101941 'GFX/thumbnails_png', 'GFX/gif_compress', // #101950 'GFX/processor_allowTemporaryMasksAsPng', // #102020 'GFX/gdlib_png', // #102023 'SYS/features/security.usePasswordPolicyForFrontendUsers', // #102113 'GFX/gdlib', // #102146 'BE/flexformForceCDATA', // #103752 'FE/addRootLineFields', // #104104 'EXTENSIONS/indexed_search/debugMode', ]

Methods

disableImageMagickDetailSettingsIfImageMagickIsDisabled()

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

protected disableImageMagickDetailSettingsIfImageMagickIsDisabled() : void

"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 happen during upgrading and will happen during first install.

protected generateEncryptionKeyIfNeeded() : void
Tags
throws
ConfigurationChangedException

migrateCachingFrameworkCaches()

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

protected migrateCachingFrameworkCaches() : void

see #88366

Tags
throws
ConfigurationChangedException

migrateDatabaseConnectionCharset()

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

protected migrateDatabaseConnectionCharset() : void
Tags
throws
ConfigurationChangedException

migrateDatabaseConnectionSettings()

Move the database connection settings to a "Default" connection

protected migrateDatabaseConnectionSettings() : void
Tags
throws
ConfigurationChangedException

migrateDatabaseDriverOptions()

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

protected migrateDatabaseDriverOptions() : void
Tags
throws
ConfigurationChangedException

migrateImageProcessorSetting()

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

protected migrateImageProcessorSetting() : void
Tags
throws
ConfigurationChangedException

migrateLockSslSetting()

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

protected migrateLockSslSetting() : void
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() : void

See #88643

Tags
throws
ConfigurationChangedException

migrateMailSmtpEncryptSetting()

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

protected migrateMailSmtpEncryptSetting() : void
Tags
throws
ConfigurationChangedException

migrateSaltedPasswordsSettings()

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

protected migrateSaltedPasswordsSettings() : void
Tags
throws
ConfigurationChangedException

migrateVersionNumberInFileNameSetting()

Migrate [FE][versionNumberInFilename] to become a boolean flag

protected migrateVersionNumberInFileNameSetting() : void
Tags
throws
ConfigurationChangedException

removeDefaultColorspaceSettings()

Remove the colorspace setting if it's already the recommended default for a given processor

protected removeDefaultColorspaceSettings() : void
Tags
throws
ConfigurationChangedException

removeObsoleteLocalConfigurationSettings()

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

protected removeObsoleteLocalConfigurationSettings() : void

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() : void

"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() : void
Tags
throws
ConfigurationChangedException

        
On this page

Search results