Skip to content
Snippets Groups Projects
  • Christian Kuhn's avatar
    [TASK] Release installation procedure from LocalConfiguration file · 5cd8ec07
    Christian Kuhn authored
    The dummy, government and introduction packages deliver with a
    default typo3conf/LocalConfiguration.php file to set defaults. If
    the installation was not yet completed, those files do not contain
    database settings. The bootstrap loads LocalConfiguration and
    redirects to the install tool in 123 mode, if those db credentials
    are missing. This is ugly and leads to several headaches.
    
    The patch introduces a new file called "FactoryConfiguration.php"
    within ext:core Configuration directory to set those defaults now.
    The packages can overload these settings with an own file in
    typo3conf called "AdditionalFactoryConfiguration", eg. to load the
    specific extensions needed during the install process.
    
    This way, the packages do not deliver a "LocalConfiguration" file
    anymore. The boostrap now just checks for the existence of the file
    and redirects to the install tool if it doesn't exist. The install
    tool then creates the "LocalConfiguration" from the factory files
    at an early point in the process.
    
    The patch has to deal with different side effect of this:
    * ConfigurationManager is no singleton anymore, there was no reason
      for that in the first place anyway.
    * ConfigurationManager has a new method to deal with the factory
      files.
    * ConfigurationManager got some refactoring to get rid of constants
    * Bootstrap is adapted to the new file existance handling.
    * GeneralUtility::fixPermissions now can give default permission
      values for files if the settings do not exist yet.
    * GeneralUtility::writeFile now accepts a new argument to force
      setting permissions. This is used in ConfigurationManager to
      end up with a LocalConfigurationFile with correct permissions
      as soon as installation is completed.
    * As usual, the patch has a good test coverage to show everything
      works as expected.
    
    Change-Id: Icb644534e6d1f426bc9512a941a69d3ee3727223
    Resolves: #46854
    Releases: 6.1
    Reviewed-on: https://review.typo3.org/19506
    Reviewed-by: Oliver Hader
    Tested-by: Oliver Hader
    Reviewed-by: Anja Leichsenring
    Tested-by: Anja Leichsenring
    Reviewed-by: Jigal van Hemert
    Tested-by: Jigal van Hemert
    Reviewed-by: Christian Kuhn
    Tested-by: Christian Kuhn
    5cd8ec07