Review main Merged

78802[BUGFIX] Check used webserver during CLI setup

Andreas Kienast CR +2 V +2 Normal +133 −29 updated 08/31/23, 09:37

Commit message

When TYPO3 is installed via CLI, the setup command now asks for the
webserver being used to be able to copy necessary webserver files, e.g.
`.htaccess` for Apache or `web.config` for IIS.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Nikita Hovratov +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Nikita Hovratov +1
    • core-ci +1 CI

Issues 1

Files 9

Review log 3954

Show 2129 earlier messages
  1. Andreas Kienast uploaded patch set 1 04/24/23, 09:23

  2. Andreas Kienast uploaded patch set 2 04/24/23, 09:24

  3. Andreas Kienast uploaded patch set 3 04/24/23, 09:25

  4. Andreas Kienast uploaded patch set 4 04/24/23, 09:30

  5. core-ci voted on patch set 3 V -1 04/24/23, 09:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41135

  6. core-ci voted on patch set 4 V -1 04/24/23, 09:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41137

  7. Andreas Kienast uploaded patch set 5 V -1 04/24/23, 09:43

  8. core-ci voted on patch set 5 V +1 04/24/23, 09:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41138

  9. Frank Nägler voted on patch set 5 CR +1 04/24/23, 10:07

  10. Andreas Kienast uploaded patch set 6 CR +1 V +1 04/24/23, 10:10

  11. Andreas Kienast uploaded patch set 7 04/24/23, 10:10

  12. core-ci voted on patch set 7 V +1 04/24/23, 10:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41140

  13. core-ci voted on patch set 6 V -1 04/24/23, 10:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41139

  14. Oliver Klee commented on patch set 7 04/24/23, 10:30

    DefaultFactory.php:31

    If I read this correctly, the parameter is unused. Is this intentional?
  15. Andreas Kienast commented on patch set 7 04/24/23, 10:34

    DefaultFactory.php:31 Reply

    You read it wrong, please check `isApacheServer()` and `isMicrosoftIisServer()` in the same class.
  16. Benni Mack commented on patch set 7 04/24/23, 10:58

    SetupCommand.php:54

    I'd say, use "other" as a synonym for "nginx"

    SetupCommand.php:149

    server-type?
  17. Oliver Klee commented on patch set 7 04/24/23, 11:04

    DefaultFactory.php:31 Reply

    Ah, I totally missed that this is constructor property promotion. Ack.
  18. Oliver Klee wrote 04/24/23, 11:05

    Removed cc Oliver Klee.
  19. Andreas Kienast commented on patch set 7 CR -1 04/24/23, 11:12

    SetupCommand.php:54 Reply

    Ack

    SetupCommand.php:149 Reply

    Ack
  20. Andreas Kienast uploaded patch set 8 CR -1 V +1 04/24/23, 11:17

  21. Andreas Kienast uploaded patch set 9 04/24/23, 11:19

  22. core-ci voted on patch set 8 V +1 04/24/23, 11:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41147

  23. core-ci voted on patch set 9 V +1 04/24/23, 11:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41149

  24. Benni Mack updated the commit message in patch set 10 V +1 05/03/23, 09:46

  25. Andreas Kienast rebased onto patch set 11 06/16/23, 10:20

  26. core-ci voted on patch set 11 V +1 06/16/23, 10:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42732

  27. Christian Kuhn commented on patch set 11 CR -1 06/16/23, 10:45

    DefaultFactory.php:32

    please don't: this pollutes __construct() and destroys possible future DI for this class, which would mean we'd have to have another factory if we want DI ... could we maybe have this with a setter that is called optionally to "force" web server type or something like that? maybe remove the access to the global altogether in the class somehow?
  28. Andreas Kienast commented on patch set 11 06/16/23, 12:19

    DefaultFactory.php:32 Reply

    If we want to get rid of $_SERVER in this class, the setter cannot be optional. Will push a new patch set.
  29. Andreas Kienast uploaded patch set 12 CR -1 V +1 06/16/23, 12:25

  1. core-ci voted on patch set 12 V -1 06/16/23, 12:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42740

  2. Andreas Kienast uploaded patch set 13 V -1 06/16/23, 12:43

  3. core-ci voted on patch set 13 V +1 06/16/23, 12:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42741

  4. Andreas Kienast rebased onto patch set 14 V +1 07/28/23, 05:57

  5. core-ci voted on patch set 14 V +1 07/28/23, 06:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44638

  6. Christian Kuhn commented on patch set 14 07/28/23, 17:56

    DefaultFactory.php:32 Reply

    Done
  7. Christian Kuhn commented on patch set 14 CR -1 07/28/23, 17:59

    DefaultFactory.php:42

    better: hand over $serverType as required argument to this method! this will this class stateless and does not need a setter.
  8. Stefan Bürk commented on patch set 14 07/28/23, 18:11

    DefaultFactory.php:42 Reply

    Should be also passed to the called methods.
  9. Helmut Hummel commented on patch set 14 08/14/23, 11:22

    DefaultFactory.php:42 Reply

    Agreed. The argument should be an optional enum (see other comment). It has to be optional to not break the API. By default, no file should be created (enum value UNKNOWN maybe?)

    DefaultFactory.php:411

    I would encapsulate this logic along with all different options into a backed enum. The enum could have factories for a request and maybe a factory for a cli input (to remove the duplication for pulling that info out of SERVER_SOFTWARE
  10. Stefan Bürk commented on patch set 14 CR -1 08/15/23, 14:25

    on it ...
  11. Stefan Bürk uploaded patch set 15 CR -1 V +1 08/15/23, 15:28

  12. Stefan Bürk commented on patch set 15 08/15/23, 15:31

    Reply

    Done

    DefaultFactory.php:42 Reply

    Enum is a good idea. However, this class is internal. So it's not public api. Therefore, no need to have a optional default handling here.

    DefaultFactory.php:411 Reply

    Ack + Done.
  13. core-ci voted on patch set 15 V -1 08/15/23, 15:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45512

  14. Stefan Bürk uploaded patch set 16 V -1 08/15/23, 15:58

  15. core-ci voted on patch set 16 V +1 08/15/23, 16:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45513

  16. Stefan Bürk uploaded patch set 17 V +1 08/15/23, 16:08

  17. core-ci voted on patch set 17 V +1 08/15/23, 16:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45514

  18. Stefan Bürk voted on patch set 17 V +1 CR +1 08/17/23, 14:51

  19. Stefan Bürk voted on patch set 17 V 0 CR -1 08/30/23, 07:37

  20. Stefan Bürk uploaded patch set 18 CR -1 V +1 08/30/23, 15:26

  21. core-ci voted on patch set 18 V +1 08/30/23, 15:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46049

  22. Nikita Hovratov voted on patch set 18 V +1 CR +1 08/31/23, 07:54

  23. Andreas Kienast commented on patch set 18 08/31/23, 08:20

    SetupCommand.php:503

    IMO we're mixing validation and normalization here, but no hard blocker.
  24. Stefan Bürk commented on patch set 18 V +2 CR +2 08/31/23, 09:24

    SetupCommand.php:503 Reply

    Done
  25. Stefan Bürk merged patch set 19 08/31/23, 09:37