TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
SilentConfigurationUpgradeService Class Reference

Public Member Functions

 __construct (ConfigurationManager $configurationManager=null)
 
 execute ()
 

Protected Member Functions

 removeObsoleteLocalConfigurationSettings ()
 
 configureBackendLoginSecurity ()
 
 generateEncryptionKeyIfNeeded ()
 
 transferHttpSettings ()
 
 disableImageMagickDetailSettingsIfImageMagickIsDisabled ()
 
 setImageMagickDetailSettings ()
 
 migrateImageProcessorSetting ()
 
 throwRedirectException ()
 
 migrateThumbnailsPngSetting ()
 
 migrateLockSslSetting ()
 
 migrateDatabaseConnectionSettings ()
 
 migrateDatabaseConnectionCharset ()
 

Protected Attributes

 $configurationManager
 
 $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 an must throw a RedirectException if new data is written to LocalConfiguration. This is caught by above step controller to initiate a redirect and start again with adapted configuration.

Definition at line 34 of file SilentConfigurationUpgradeService.php.

Constructor & Destructor Documentation

__construct ( ConfigurationManager  $configurationManager = null)

Member Function Documentation

configureBackendLoginSecurity ( )
protected

Backend login security is set to rsa if rsaauth is installed (but not used) otherwise the default value "normal" has to be used. This forces either 'normal' or 'rsa' to be set in LocalConfiguration.

Returns
void

Definition at line 141 of file SilentConfigurationUpgradeService.php.

References ExtensionManagementUtility\isLoaded(), and SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

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.

Returns
void

Definition at line 386 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

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.

Returns
void

Definition at line 169 of file SilentConfigurationUpgradeService.php.

References GeneralUtility\makeInstance(), and SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

migrateDatabaseConnectionCharset ( )
protected

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

Returns
void

Definition at line 694 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\$configurationManager, and SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

migrateDatabaseConnectionSettings ( )
protected

Move the database connection settings to a "Default" connection

Returns
void

Definition at line 613 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\$configurationManager, and SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

migrateImageProcessorSetting ( )
protected

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

Returns
void

Definition at line 492 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

migrateLockSslSetting ( )
protected

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

Returns
void

Definition at line 594 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

migrateThumbnailsPngSetting ( )
protected

Migrate the configuration value thumbnails_png to a boolean value.

Returns
void

Definition at line 571 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

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.

Returns
void

Definition at line 124 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

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.

Returns
void

Definition at line 449 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

transferHttpSettings ( )
protected

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

Returns
void

Definition at line 190 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

Member Data Documentation

$obsoleteLocalConfigurationSettings
protected

Definition at line 49 of file SilentConfigurationUpgradeService.php.