Review main Merged

77634[TASK] Migrate legacy AdditionalConfiguration.php

Josef Glatz CR +2 V +2 Normal +45 −12 updated 02/22/23, 12:40

Commit message

This patch takes care of migrating a legacy AdditionalConfiguration.php
even if a settings.php is already present.
It extends the change from
the former patch of issue #98319 and follows its ChangeLog documentation.

Such a scenario is noticeable, for example, during the installation
process under DDEV and TYPO3 12.x / main. Another scenario could be
upgrading from an older TYPO3 major version.
A similar scenario is the usage of an existing (legacy) TYPO3 project
boilerplate file structure.

Similar to the handling of LocalConfiguration.php, AdditionalConfiguration.php
is also automatically migrated from now on.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 3853

Show 1828 earlier messages
  1. Josef Glatz uploaded patch set 1 01/30/23, 07:03

  2. Josef Glatz updated the commit message in patch set 2 01/30/23, 07:08

  3. core-ci voted on patch set 1 V -1 01/30/23, 07:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36748

  4. core-ci voted on patch set 2 V -1 01/30/23, 07:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36749

  5. Josef Glatz uploaded patch set 3 V -1 01/30/23, 07:27

  6. core-ci voted on patch set 3 V -1 01/30/23, 07:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36752

  7. Josef Glatz uploaded patch set 4 V -1 01/30/23, 07:38

  8. core-ci voted on patch set 4 V -1 01/30/23, 07:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36753

  9. Simon Gilli commented on patch set 4 CR -1 01/30/23, 10:26

    Thanks! I think this could be simplified...

    Bootstrap.php:224

    Instead of adding this condition again and again just call self::migrateLegacyAdditionalConfiguration($configurationManager) before and you should be done

    Bootstrap.php:229

    This check is done in the function already and can be removed

    Bootstrap.php:244

    Don't think this needs to be declared public

    Bootstrap.php:255

    Don't think this needs to be declared public
  10. Josef Glatz commented on patch set 4 V -1 CR -1 01/30/23, 18:53

    thanks for your input. I discussed another way with Georg and will push another patch
  11. Josef Glatz uploaded patch set 5 CR -1 V -1 01/30/23, 21:24

  12. Josef Glatz commented on patch set 5 01/30/23, 21:32

    Hey folks, I have reduced the size of changes after talking to Georg. The patch now does extend the existing if-condition for the early return statement – just as little as possible. The existing logic is now only devided into 2 if-conditions without any functions in the Bootstrap class. I hope the local $renamed variable approach is acceptable in this lowlevel Bootstrap functions. I tried to keep the current implementation as much as possible. How to test: a typo3conf/AdditionalConfiguration.php is now also renamed if a settings.php is already in place. I'm looking forward to your feedback again and would then try to tackle the tests
  13. Josef Glatz commented on patch set 5 01/30/23, 21:33

    Bootstrap.php:224 Reply

    Done

    Bootstrap.php:229 Reply

    Done

    Bootstrap.php:244 Reply

    Done

    Bootstrap.php:255 Reply

    Done
  14. Josef Glatz updated the commit message in patch set 6 01/30/23, 21:48

  15. Josef Glatz commented on patch set 6 01/30/23, 21:48

    This change is ready for review.
  16. core-ci voted on patch set 5 V -1 01/30/23, 22:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36798

  17. core-ci voted on patch set 6 V -1 01/30/23, 22:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36800

  18. Josef Glatz updated the commit message in patch set 7 V -1 01/31/23, 07:30

  19. Benni Mack commented on patch set 7 01/31/23, 09:00

    ConfigurationManager.php:144

    I don't think we need the new method. You can see that we already use getLegacyConfigPath() in Bootstrap.
  20. core-ci voted on patch set 7 V -1 01/31/23, 09:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36807

  21. Josef Glatz uploaded patch set 8 V -1 02/14/23, 05:25

  22. Josef Glatz commented on patch set 8 02/14/23, 05:26

    ConfigurationManager.php:144 Reply

    Done
  23. core-ci voted on patch set 8 V -1 02/14/23, 06:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37670

  24. Josef Glatz uploaded patch set 9 V -1 02/14/23, 11:28

  25. Josef Glatz uploaded patch set 10 02/14/23, 11:33

  26. core-ci voted on patch set 9 V +1 02/14/23, 11:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37681

  27. core-ci voted on patch set 10 V +1 02/14/23, 11:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37682

  28. Josef Glatz updated the commit message in patch set 11 V +1 02/14/23, 11:48

  1. core-ci voted on patch set 11 V +1 02/14/23, 11:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37685

  2. Markus Klein commented on patch set 11 02/14/23, 12:36

    Bootstrap.php:216

    extract this to variable as well please
  3. Josef Glatz commented on patch set 11 CR -1 02/14/23, 12:44

    on it
  4. Josef Glatz uploaded patch set 12 CR -1 V +1 02/14/23, 14:11

  5. Josef Glatz commented on patch set 12 02/14/23, 14:12

    Bootstrap.php:216 Reply

    Done
  6. core-ci voted on patch set 12 V +1 02/14/23, 14:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37693

  7. Josef Glatz commented on patch set 12 02/14/23, 14:19

    - Moved all file_exists() calls into variables - Removed superfluous operators true/false - used local variables where it made sense - removed detailed scenario notes (moved to issue description) and added just relevant migration scenarios to the commit message
  8. Markus Klein uploaded patch set 13 V +1 02/14/23, 14:46

  9. Markus Klein commented on patch set 13 CR +1 02/14/23, 14:47

    Only moved some variables around. Nice stuff
  10. core-ci voted on patch set 13 V +1 02/14/23, 14:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37694

  11. Georg Ringer voted on patch set 13 V +1 CR +1 02/15/23, 07:43

  12. Oli Bartsch commented on patch set 13 02/16/23, 09:57

    Bootstrap.php:238

    Just to be consistent, should we also add a $legacyLocalConfigurationFileExists variable?
  13. Markus Klein commented on patch set 13 CR -1 02/16/23, 10:36

    Bootstrap.php:238 Reply

    thought about this, but 1) it's only needed once here 2) it's only done when really needed. But thinking about it again, I'll optimize the code for performance (less disk I/O) again
  14. Markus Klein uploaded patch set 14 CR +1 V +1 02/16/23, 10:43

  15. Markus Klein commented on patch set 14 02/16/23, 10:44

    Bootstrap.php:238 Reply

    Done
  16. core-ci voted on patch set 14 V +1 02/16/23, 10:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37792

  17. Markus Klein voted on patch set 14 V +1 CR +1 02/16/23, 11:36

  18. Oli Bartsch commented on patch set 14 V -1 02/20/23, 11:10

    Bootstrap.php:250

    This might lead to the fact that the method returns true even no system.php file exists.
  19. Oli Bartsch uploaded patch set 15 CR +1 V +1 02/20/23, 11:36

  20. Oli Bartsch commented on patch set 15 V +1 CR +1 02/20/23, 11:43

    Bootstrap.php:250 Reply

    Done
  21. core-ci voted on patch set 15 V +1 02/20/23, 11:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37891

  22. Benni Mack voted on patch set 15 V +2 CR +2 02/22/23, 11:56

  23. Benni Mack merged patch set 16 02/22/23, 11:56

  24. Markus Klein commented on patch set 16 02/22/23, 12:21

    Post -1

    Bootstrap.php:232

    I explicitly designed my version (Patch 14) so that we have minimal I/O for this code executed for every request. We no check for a legacy addtionalconfig file for every request!
  25. Markus Klein commented on patch set 16 02/22/23, 12:40

    Bootstrap.php:232 Reply