Review main Merged

57816[BUGFIX] Do not depend on global env to define cli mode

Helmut Hummel CR +2 V +2 Normal +43 −22 updated 08/21/18, 11:10

Commit message

Instead of depending on a global environment variable
to set the TYPO3 environment in cli mode, we inject the mode
properly from within the entry point.

We now move the code to initialize the environment
to SystemEnvironmentBuilder:run() where we can evaluate
the request type passed to this method, to properly
set cli or non cli mode.

Depending on a global env to set the TYPO3 environment
would require hacks, like changing the global env to
properly select the cli mode (currently done in testing framework).
Using an application sub context for that purpose isn't ideal either,
because at best we would need to also test for magic contexts
like "Production/Frontend" or "Development/Frontend" and at worst
it conflicts with user defined contexts. It wouldn't be possible
to define a sub context and still properly start a frontend application
within this context.

composer req --dev typo3/testing-framework ~4.4.1

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Daniel Goerz +1
    • Benni Mack +1
  • Verified V +2
    • Christian Kuhn +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 5

Review log 2540

Show 915 earlier messages
  1. Helmut Hummel uploaded patch set 1 08/05/18, 10:43

  2. Helmut Hummel commented on patch set 1 08/05/18, 10:47

    corresponding change in the cli application entry point: https://github.com/TYPO3/cms-cli/pull/2
  3. Helmut Hummel uploaded patch set 2 08/05/18, 10:48

  4. TYPO3com voted on patch set 1 V -1 08/05/18, 10:50 Completed build in 07m 03s on Sun, 5 Aug, 12:50 PM Test Summary: 21 of 4693 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26191

  5. TYPO3com voted on patch set 2 V -1 08/05/18, 10:55 Completed build in 07m 01s on Sun, 5 Aug, 12:55 PM Test Summary: 21 of 4693 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26192

  6. Helmut Hummel uploaded patch set 3 08/05/18, 11:08

  7. TYPO3com voted on patch set 3 V -1 08/05/18, 11:14 Completed build in 05m 55s on Sun, 5 Aug, 01:14 PM Test Summary: 102 of 33834 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26195

  8. Helmut Hummel uploaded patch set 4 08/13/18, 10:20

  9. TYPO3com voted on patch set 4 V -1 08/13/18, 10:32 Completed build in 10m 45s on Mon, 13 Aug, 12:32 PM Test Summary: 618 of 34884 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26483

  10. Helmut Hummel uploaded patch set 5 08/14/18, 12:34

  11. TYPO3com voted on patch set 5 V -1 08/14/18, 12:44 Completed build in 09m 59s on Tue, 14 Aug, 02:44 PM Test Summary: 618 of 34950 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26544

  12. Helmut Hummel uploaded patch set 6 08/14/18, 15:08

  13. TYPO3com voted on patch set 6 V -1 08/14/18, 15:08 Completed build in 05s on Tue, 14 Aug, 05:08 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26560

  14. Helmut Hummel commented on patch set 6 CR -2 08/14/18, 15:08

    needs testing framework change
  15. Helmut Hummel commented on patch set 6 08/14/18, 15:11

  1. Helmut Hummel uploaded patch set 7 08/14/18, 15:14

  2. TYPO3com voted on patch set 7 V -1 08/14/18, 15:14 Completed build in 05s on Tue, 14 Aug, 05:14 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26561

  3. Helmut Hummel uploaded patch set 8 08/16/18, 12:45

  4. TYPO3com voted on patch set 8 V -1 08/16/18, 12:52 Completed build in 06m 57s on Thu, 16 Aug, 02:52 PM Test Summary: 34863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26661

  5. TYPO3com commented on patch set 8 08/16/18, 12:58 Completed build in 19m 26s on Thu, 16 Aug, 02:58 PM Test Summary: 34863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26661

  6. Helmut Hummel uploaded patch set 9 08/16/18, 13:01

  7. TYPO3com voted on patch set 9 V +1 08/16/18, 13:07 Completed build in 06m 30s on Thu, 16 Aug, 03:07 PM Test Summary: 34863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26662

  8. Helmut Hummel uploaded patch set 10 08/16/18, 13:20

  9. Helmut Hummel uploaded patch set 11 08/16/18, 13:27

  10. TYPO3com voted on patch set 10 V +1 08/16/18, 13:27 Completed build in 07m 00s on Thu, 16 Aug, 03:27 PM Test Summary: 34863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26663

  11. TYPO3com voted on patch set 11 V +1 08/16/18, 13:35 Completed build in 08m 25s on Thu, 16 Aug, 03:35 PM Test Summary: 34863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26664

  12. Helmut Hummel uploaded patch set 12 08/20/18, 10:40

  13. TYPO3com voted on patch set 12 V +1 08/20/18, 10:48 Completed build in 08m 06s on Mon, 20 Aug, 12:48 PM Test Summary: 34905 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26816

  14. Helmut Hummel uploaded patch set 13 08/20/18, 11:09

  15. TYPO3com voted on patch set 13 V +1 08/20/18, 11:22 Completed build in 11m 22s on Mon, 20 Aug, 01:22 PM Test Summary: 34905 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26818

  16. Helmut Hummel uploaded patch set 14 08/20/18, 11:51

  17. Helmut Hummel voted on patch set 14 CR 0 08/20/18, 11:52

  18. TYPO3com voted on patch set 14 V +1 08/20/18, 12:01 Completed build in 09m 24s on Mon, 20 Aug, 02:01 PM Test Summary: 34905 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-26823

  19. Benni Mack voted on patch set 14 V +1 CR +1 08/20/18, 12:17

  20. Daniel Goerz voted on patch set 14 CR +1 08/20/18, 19:22

  21. Christian Kuhn voted on patch set 14 V +2 CR +2 08/21/18, 08:42

  22. Christian Kuhn merged patch set 15 08/21/18, 08:42

  23. Mathias Brodala commented on patch set 15 08/21/18, 08:51

    SystemEnvironmentBuilder.php:560

    What about "phpdbg"?
  24. Helmut Hummel commented on patch set 15 08/21/18, 11:01

    SystemEnvironmentBuilder.php:560 Reply

    I see your point, however as long as other parts in TYPO3 die hard (pun intended), it does not help to check here for other sapis. besides that, the core does never call this with a null value with this patch, so this is just a BC clause. So making cli accessible via phpdbg would require additional changes
  25. Mathias Brodala commented on patch set 15 08/21/18, 11:10

    SystemEnvironmentBuilder.php:560 Reply

    OK, that's fine for me, thanks for looking into this.