TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SilentConfigurationUpgradeService Class Reference

Public Member Functions

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager)
 
 injectConfigurationManager (\TYPO3\CMS\Core\Configuration\ConfigurationManager $configurationManager)
 
 execute ()
 

Protected Member Functions

 removeObsoleteLocalConfigurationSettings ()
 
 configureBackendLoginSecurity ()
 
 configureSaltedPasswords ()
 
 generateEncryptionKeyIfNeeded ()
 
 setProxyAuthScheme ()
 
 transferDeprecatedCurlSettings ()
 
 disableImageMagickAndGdlibIfImageProcessingIsDisabled ()
 
 disableImageMagickDetailSettingsIfImageMagickIsDisabled ()
 
 setImageMagickDetailSettings ()
 
 throwRedirectException ()
 

Protected Attributes

 $objectManager = null
 
 $configurationManager = null
 
 $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 32 of file SilentConfigurationUpgradeService.php.

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 167 of file SilentConfigurationUpgradeService.php.

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

Referenced by SilentConfigurationUpgradeService\execute().

configureSaltedPasswords ( )
protected

Check the settings for salted passwords extension to load it as a required extension. Unset obsolete configuration options if given.

Returns
void

Definition at line 192 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

disableImageMagickAndGdlibIfImageProcessingIsDisabled ( )
protected

GFX/im and GFX/gdlib must be set to 0 if image_processing 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 341 of file SilentConfigurationUpgradeService.php.

References 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 384 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

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 231 of file SilentConfigurationUpgradeService.php.

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

Referenced by SilentConfigurationUpgradeService\execute().

injectConfigurationManager ( \TYPO3\CMS\Core\Configuration\ConfigurationManager  $configurationManager)
Parameters
\TYPO3\CMS\Core\Configuration\ConfigurationManager$configurationManager

Definition at line 118 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\$configurationManager.

injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManager  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManager$objectManager

Definition at line 110 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\$objectManager.

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 150 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 442 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

setProxyAuthScheme ( )
protected

$GLOBALS['TYPO3_CONF_VARS']['HTTP']['proxy_auth_scheme'] must be either 'digest' or 'basic'. 'basic' is default in DefaultConfiguration, so the setting can be removed from LocalConfiguration if it is not set to 'digest'.

Returns
void

Definition at line 254 of file SilentConfigurationUpgradeService.php.

References SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

throwRedirectException ( )
protected
transferDeprecatedCurlSettings ( )
protected

Parse old curl options and set new http ones instead

Returns
void

Definition at line 274 of file SilentConfigurationUpgradeService.php.

References $GLOBALS, GeneralUtility\revExplode(), and SilentConfigurationUpgradeService\throwRedirectException().

Referenced by SilentConfigurationUpgradeService\execute().

Member Data Documentation

$configurationManager = null
protected
$objectManager = null
protected
$obsoleteLocalConfigurationSettings
protected

Definition at line 52 of file SilentConfigurationUpgradeService.php.