Review main Merged

90910[BUGFIX] Revert "[BUGFIX] Enable EnvironmentStatusReport for cli"

Benjamin Franzke CR +2 V +2 Easy +3 −0 updated 10/10/25, 09:47

Commit message

This reverts commit 032686ce67dc67dfac86823f9c39a83f0e02d78b.

Reason for revert: The TYPO3 environment status report requires
a web server request in order to read from the $_SERVER super
global, otherwise scheduler tasks will error with PHP warnings like:

    Undefined array key "HTTP_HOST"

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1213

  1. Benjamin Franzke uploaded patch set 1 10/06/25, 14:26

  2. core-ci voted on patch set 1 V +1 10/06/25, 14:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86074

  3. Garvin Hicking commented on patch set 1 10/06/25, 15:01

    Haven't looked at the code at these places yet, but could we just gate those specific array access parts instead of denying everything?
  4. Oli Bartsch commented on patch set 1 10/06/25, 19:23

    Reply

    Yes that would also be my suggestion. I can’t see why this patch qualifies for a complete revert instead of fixing this one report.
  5. Benjamin Franzke commented on patch set 1 10/06/25, 19:44

    Reply

    The revert is needed because there will be a release next week and this breaks installations. > Haven't looked at the code at these places yet, but could we just gate those specific array access parts instead of denying everything? That's not an option. The bug report – https://forge.typo3.org/issues/94365 – was about discrepancies between web-based and CLI-based tests. Nothing has been solved – since webserver tests still do not run – instead an error an been introduced. Now, we could guard the warnings, but the discrepancy would remain: CLI test would be different to the WEB test. I actually already proposed an alternative approach that targets the original demand of the bug report, please see https://review.typo3.org/c/Packages/TYPO3.CMS/+/90813/2#message-7ac5383dcf1cfe9cb4ec9219193ca65de860ef83 > An alternative approach could be to make it configurable which target server is to be tested and allow execution in CLI context only if this configuration has been provided. That means we need new API in order to configure the HOST NAME/server to be used in checks. We won't be able to do that until next week and our policy is to revert patches if there is no real simple fix for introduced problems.
  6. Garvin Hicking commented on patch set 1 10/07/25, 04:45

    Reply

    Thanks for the explanation, I see your point! However, I feel this could be salvageable. See https://review.typo3.org/c/Packages/TYPO3.CMS/+/90918 for an approach that would improve the situation. CLI-based scheduler should now send a report, only two check steps access info that is using request-specific variables. I also added a new disclaimer to advertise possible differences in PHP configuration. Running the scheduler on CLI also operates with a possibly different PHP config, so I think it's important to have a CLI-based report available.
  7. Oli Bartsch commented on patch set 1 10/07/25, 06:11

    Reply

    > The bug report – https://forge.typo3.org/issues/94365 – was about discrepancies between web-based and CLI-based tests. Thats not true. The report is not about "discrepancies" but about a completely *empty* report via CLI. By guarding the statuses, which currently require request context, we still would improve the situation as most of the used statuses are then still be sent. Implementing a new API here looks as a FEATURE anyways and could not be backported to v13.
  8. Benjamin Franzke commented on patch set 1 10/07/25, 06:25

    Reply

    My opinion is: A report that quietly omits some tests is a false report. That's what the bug report was about – it shows no errors although there could have been some. By applying a fine-grained selection to filter-out *some* tests this would improve a bit, yes, but we'd still send an incomplete report, which gives a false sense of security, because some tests have been omitted. I think it's fine to disagree on what a proper fix for this issue is: I'm against a "half" fix that proposes a false sense of security, but if you find enough voters you are free to fix the issue with an alternative patch. If there's no fix until next week we need to merge this revert to prevent a broken release. > Implementing a new API here looks as a FEATURE anyways and could not be backported to v13 Ack, that's why I pushed the revert, because it's not fixable in a proper way in v13 (in my opinion) – but we have to realize: The merged patch is broken.
  9. Oli Bartsch commented on patch set 1 10/07/25, 13:48

    Reply

    I can really live with both options while given the clear disclaimer, Garvin added in his patch, I tend to output at least a couple of reports instead of none (in v13) and try to fix this in a whole for v14 with a new API.
  10. Oli Bartsch commented on patch set 1 CR +1 V +1 10/09/25, 13:22

    Reply

    I thought about this again. Let's start on a clean state and revert the patch.
  11. Garvin Hicking commented on patch set 1 CR +1 V +1 10/10/25, 09:45

    Good to revert and take a full stab at it.
  12. Benjamin Franzke voted on patch set 1 CR +2 V +2 10/10/25, 09:46

  13. Benjamin Franzke merged patch set 2 10/10/25, 09:47