‪TYPO3CMS  11.5
TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService Class Reference

Public Member Functions

 __construct (ConfigurationManager $configurationManager)
 
 execute ()
 

Protected Member Functions

 removeObsoleteLocalConfigurationSettings ()
 
 generateEncryptionKeyIfNeeded ()
 
 transferHttpSettings ()
 
 disableImageMagickDetailSettingsIfImageMagickIsDisabled ()
 
 setImageMagickDetailSettings ()
 
 migrateImageProcessorSetting ()
 
 throwConfigurationChangedException ()
 
 migrateThumbnailsPngSetting ()
 
 migrateLockSslSetting ()
 
 migrateDatabaseConnectionSettings ()
 
 migrateDatabaseConnectionCharset ()
 
 migrateDatabaseDriverOptions ()
 
 migrateLangDebug ()
 
 migrateCacheHashOptions ()
 
 migrateExceptionErrors ()
 
 migrateDisplayErrorsSetting ()
 
 migrateSaltedPasswordsSettings ()
 
 migrateCachingFrameworkCaches ()
 
 migrateMailSettingsToSendmail ()
 
 migrateMailSmtpEncryptSetting ()
 
 migrateExplicitADmode ()
 

Protected Attributes

ConfigurationManager $configurationManager
 
array $obsoleteLocalConfigurationSettings
 

Detailed Description

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.

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

Definition at line 42 of file SilentConfigurationUpgradeService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::__construct ( ConfigurationManager  $configurationManager)

Member Function Documentation

◆ disableImageMagickDetailSettingsIfImageMagickIsDisabled()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::disableImageMagickDetailSettingsIfImageMagickIsDisabled ( )
protected

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

"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.

Exceptions
ConfigurationChangedException

Definition at line 454 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ execute()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::execute ( )

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

Exceptions
ConfigurationChangedException

Definition at line 181 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\disableImageMagickDetailSettingsIfImageMagickIsDisabled(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\generateEncryptionKeyIfNeeded(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateCacheHashOptions(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateCachingFrameworkCaches(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateDatabaseConnectionCharset(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateDatabaseConnectionSettings(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateDatabaseDriverOptions(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateDisplayErrorsSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateExceptionErrors(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateExplicitADmode(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateImageProcessorSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateLangDebug(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateLockSslSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateMailSettingsToSendmail(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateMailSmtpEncryptSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateSaltedPasswordsSettings(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateThumbnailsPngSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\removeObsoleteLocalConfigurationSettings(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\setImageMagickDetailSettings(), and TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\transferHttpSettings().

◆ generateEncryptionKeyIfNeeded()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::generateEncryptionKeyIfNeeded ( )
protected

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.

Exceptions
ConfigurationChangedException

Definition at line 233 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ migrateCacheHashOptions()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateCacheHashOptions ( )
protected

◆ migrateCachingFrameworkCaches()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateCachingFrameworkCaches ( )
protected

◆ migrateDatabaseConnectionCharset()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateDatabaseConnectionCharset ( )
protected

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

Exceptions
ConfigurationChangedException

Definition at line 808 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\$configurationManager, and TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ migrateDatabaseConnectionSettings()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateDatabaseConnectionSettings ( )
protected

◆ migrateDatabaseDriverOptions()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateDatabaseDriverOptions ( )
protected

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

Exceptions
ConfigurationChangedException

Definition at line 828 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\$configurationManager, and TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ migrateDisplayErrorsSetting()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateDisplayErrorsSetting ( )
protected

◆ migrateExceptionErrors()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateExceptionErrors ( )
protected

◆ migrateExplicitADmode()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateExplicitADmode ( )
protected

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.

See also
#94721

Definition at line 1113 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\$configurationManager, and TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ migrateImageProcessorSetting()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateImageProcessorSetting ( )
protected

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

Exceptions
ConfigurationChangedException

Definition at line 559 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ migrateLangDebug()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateLangDebug ( )
protected

Migrate the configuration setting BE/lang/debug if set in the LocalConfiguration.php file

Exceptions
ConfigurationChangedException

Definition at line 850 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\$configurationManager, and TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ migrateLockSslSetting()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateLockSslSetting ( )
protected

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

Exceptions
ConfigurationChangedException

Definition at line 667 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ migrateMailSettingsToSendmail()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateMailSettingsToSendmail ( )
protected

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

Definition at line 1055 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\$configurationManager, and TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ migrateMailSmtpEncryptSetting()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateMailSmtpEncryptSetting ( )
protected

◆ migrateSaltedPasswordsSettings()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateSaltedPasswordsSettings ( )
protected

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

Exceptions
ConfigurationChangedException

Definition at line 971 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\$configurationManager, and TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ migrateThumbnailsPngSetting()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::migrateThumbnailsPngSetting ( )
protected

Migrate the configuration value thumbnails_png to a boolean value.

Exceptions
ConfigurationChangedException

Definition at line 644 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ removeObsoleteLocalConfigurationSettings()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::removeObsoleteLocalConfigurationSettings ( )
protected

Some settings in LocalConfiguration vanished in DefaultConfiguration and have no impact on the core anymore. To keep the configuration clean, those old settings are just silently removed from LocalConfiguration if set.

Exceptions
ConfigurationChangedException

Definition at line 215 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ setImageMagickDetailSettings()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::setImageMagickDetailSettings ( )
protected

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

"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.

Exceptions
ConfigurationChangedException

Definition at line 517 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

◆ throwConfigurationChangedException()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::throwConfigurationChangedException ( )
protected

Throw exception after configuration change to trigger a redirect.

Exceptions
ConfigurationChangedException

Definition at line 631 of file SilentConfigurationUpgradeService.php.

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\disableImageMagickDetailSettingsIfImageMagickIsDisabled(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\generateEncryptionKeyIfNeeded(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateCacheHashOptions(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateCachingFrameworkCaches(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateDatabaseConnectionCharset(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateDatabaseConnectionSettings(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateDatabaseDriverOptions(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateDisplayErrorsSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateExceptionErrors(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateExplicitADmode(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateImageProcessorSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateLangDebug(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateLockSslSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateMailSettingsToSendmail(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateMailSmtpEncryptSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateSaltedPasswordsSettings(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\migrateThumbnailsPngSetting(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\removeObsoleteLocalConfigurationSettings(), TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\setImageMagickDetailSettings(), and TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\transferHttpSettings().

◆ transferHttpSettings()

TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::transferHttpSettings ( )
protected

Parse old curl and HTTP options and set new HTTP options, related to Guzzle

Exceptions
ConfigurationChangedException

Definition at line 254 of file SilentConfigurationUpgradeService.php.

References TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\throwConfigurationChangedException().

Referenced by TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService\execute().

Member Data Documentation

◆ $configurationManager

◆ $obsoleteLocalConfigurationSettings

array TYPO3\CMS\Install\Service\SilentConfigurationUpgradeService::$obsoleteLocalConfigurationSettings
protected

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

Definition at line 55 of file SilentConfigurationUpgradeService.php.