Review main Merged Breaking

75858[!!!][TASK] Move LocalConfiguration to system/settings.php

Benni Mack CR +2 V +2 Hard +275 −127 updated 10/01/22, 18:26

Commit message

When running in composer-mode TYPO3 can benefit
from having most PHP code outside of the document root,
making TYPO3 behave more like a modern PHP application.

In addition, the name "LocalConfiguration" sounds very confusing,
and has been in its place for 10 years (TYPO3 v6.0).

The file names are changed, as "Local" is very confusing
for newcomers, as it is actually a "instance-specific" or
"installation-specific" regular configuration / settings file,
paving the way to making it easier to understand TYPO3 in general.

For this reason, when TYPO3 is running in composer mode
with a separate public/ folder, the previous locations

* public/typo3conf/LocalConfiguration.php
* public/typo3conf/AdditionalConfiguration.php

are now located at
* config/system/settings.php
* config/system/additional.php

In non-composer mode the files are now moved to
* typo3conf/system/settings.php
* typo3conf/system/additional.php

Combined with the typo3/cms-composer-installers v5,
the actual typo3conf folder does not need to be created anymore
in Composer Mode for v12+.

Configuration files of TYPO3 projects from previous versions
are automatically moved to the proper file location.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
    • core-ci +1 CI

Issues 1

Files 36

Show 16 more files

Review log 3044

Show 1419 earlier messages
  1. Benni Mack uploaded patch set 1 09/22/22, 22:33

  2. core-ci voted on patch set 1 V -1 09/22/22, 22:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31464

  3. Helmut Hummel commented on patch set 1 09/23/22, 15:42

    ConfigurationManager.php:159

    How about override.settings.php or at least: "additional.settings.php"?
  4. Benni Mack commented on patch set 1 09/23/22, 15:44

    ConfigurationManager.php:159 Reply

    fine with me. I would personally prefer to have an "override.settings.php" which is loaded AFTER all extensions ext_localconf.php code is loaded. Because your installation should / could override extension configuration - right now this is not possible and I think a bad architecture design (extensions config is loaded after an installation specific "override" configuration).
  5. Benjamin Franzke commented on patch set 1 09/26/22, 08:30

    ConfigurationManager.php:159 Reply

    My opinion is: Let's not overload dots which somehow imply a more specific file format, we can use dashes just fine, that is how all unix tools works. My suggestion: LocalConfiguration.php => config/settings/typo3.php AdditionalConfiguration.php => config/settings/typo3.d/override.php While we'd actually allow config/settings/typo3.d/*.php (sorted alphabetically) to be used (just like all modern unix-tools allow to use .d configuration directories).
  6. Benjamin Franzke commented on patch set 1 09/26/22, 08:31

    ConfigurationManager.php:159 Reply

    Sorry, forgot to say why I opted for `typo3.php`: I think it's good to be explicit here, when you work with many composer libraries, it's good to make it cristal clear, that this is config that is processed by TYPO3.
  7. Benni Mack commented on patch set 1 09/27/22, 09:25

    ConfigurationManager.php:159 Reply

    @bnf. in your example you move to "config/settings". One of my goals is that we refer to settings as "something that we could also move to yaml, json, ini whatever" whereas "AdditionalConfiguration.php" is something that people can execute stuff in (nothing is returned from the file). How about "config/system/settings.php" and "config/system/boot.php" ?
  8. Benjamin Franzke commented on patch set 1 09/27/22, 11:10

    ConfigurationManager.php:159 Reply

    Ah, sorry, I actually didn't want to touch the prefix `config/system/` which you choosed – it was basically a typo/copy-paste-mistake that I wrote /settings/ there :\ I'm fine with the *.yaml,*.json thingy, I basically wanted to ensure that we provide not just one filename per configuration target, but also .d directories, which makes it easy for tools like ddev to write to a config file like config/system/typo3.d/ddev.php without conflicting with other "additional" configuration. I don't know about settings.php vs boot.php (don't like boot.php a lot) but I understand why that procesed reservations regarding a maybe too-specific typo3.{php,json,yaml,conf} file. So I'm fine with config/system/settings.php and would love to see `config/system/settings.d/override.php` as replacement for AdditionalConfiguration.php Then we could add support for reading all files from settings.d/*.php in 12.x releases.
  9. Benni Mack uploaded patch set 2 09/30/22, 13:00

  10. Benni Mack commented on patch set 2 09/30/22, 13:02

    I think the

    ConfigurationManager.php:159 Reply

    I think we could go with * config/system/settings.php * config/system/additional.php seems like the least common denominator. I am thinking if we want to migrate also "non-composer" installations to this format, basically having everything then in typo3conf/system/settings.php. With this way, we could use the naming for both modes. WDYT?
  11. core-ci voted on patch set 2 V -1 09/30/22, 13:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31753

  12. Chris Müller commented on patch set 2 09/30/22, 16:50

    ConfigurationManager.php:159 Reply

    Using the new names also for legacy installations would make it better understandable and easier in the documentation as we only have to document one case and not both variants simultaneously.
  13. Benni Mack updated the commit message in patch set 3 09/30/22, 20:12

  14. core-ci voted on patch set 3 V -1 09/30/22, 20:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31769

  15. Benni Mack uploaded patch set 4 09/30/22, 20:48

  16. core-ci voted on patch set 4 V -1 09/30/22, 20:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31771

  17. Benni Mack uploaded patch set 5 09/30/22, 21:01

  18. core-ci voted on patch set 5 V -1 09/30/22, 21:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31772

  19. Benni Mack uploaded patch set 6 09/30/22, 21:21

  1. core-ci voted on patch set 6 V -1 09/30/22, 21:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31775

  2. Benni Mack uploaded patch set 7 09/30/22, 22:21

  3. core-ci voted on patch set 7 V -1 09/30/22, 22:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31780

  4. Benni Mack uploaded patch set 8 09/30/22, 23:05

  5. core-ci voted on patch set 8 V -1 09/30/22, 23:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31784

  6. Benjamin Franzke uploaded patch set 9 10/01/22, 05:26

  7. Benjamin Franzke commented on patch set 9 10/01/22, 05:26

    Bootstrap.php:226

    needs to be octal notation, otherwise this number is taken as decimal value, which evaluates to 05327 (octal), causing permissions for reading to be missing and permissions to be quite funny (d-ws-w-rwt).

    Maintenance.php:363

    I think we can remove this here, as this check will always have been performed in Core/Bootstrap, right?
  8. core-ci voted on patch set 9 V -1 10/01/22, 05:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31797

  9. Benjamin Franzke commented on patch set 9 10/01/22, 05:39

    Unresolved

    hm... should we also move PackageStates.php for classic mode to not leave classic-mode in a limbo state of mixed config locations?
    well, there is still typo3conf/ENABLE_INSTALL_TOOL in composer-mode :\
  10. Benjamin Franzke uploaded patch set 10 10/01/22, 05:54

  11. core-ci voted on patch set 10 V -1 10/01/22, 06:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31798

  12. Benjamin Franzke uploaded patch set 11 10/01/22, 07:30

  13. core-ci voted on patch set 11 V -1 10/01/22, 07:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31800

  14. Benni Mack commented on patch set 11 10/01/22, 15:47

    ConfigurationManager.php:159 Reply

    Done
  15. Benjamin Franzke uploaded patch set 12 10/01/22, 15:49

  16. core-ci voted on patch set 12 V -1 10/01/22, 16:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31834

  17. Benjamin Franzke uploaded patch set 13 10/01/22, 16:12

  18. Benjamin Franzke uploaded patch set 14 10/01/22, 16:14

  19. core-ci voted on patch set 14 V +1 10/01/22, 16:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31836

  20. Benni Mack uploaded patch set 15 10/01/22, 17:04

  21. Benni Mack commented on patch set 15 10/01/22, 17:06

    Reply Unresolved

    good, I think we can migrate this separately later-on.

    Maintenance.php:363 Reply Unresolved

    I do think I tried this locally on a new installation going to typo3/install.php directly... however, yes. might not be needed.
  22. Benjamin Franzke voted on patch set 15 V +1 CR +1 10/01/22, 17:06

  23. core-ci voted on patch set 15 V +1 10/01/22, 17:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/31838

  24. Georg Ringer voted on patch set 15 V +2 CR +2 10/01/22, 18:25

  25. Georg Ringer merged patch set 16 10/01/22, 18:26