Review main Merged

64330[TASK] Remove dead and outdated check for TYPO3_PATH_WEB constant

Helmut Hummel CR +2 V +2 Easy +14 −19 updated 04/28/20, 08:44

Commit message

The check for the constant TYPO3_PATH_WEB was an experiment,
to allow a document root with public assets only, but
this never worked out and was never really used.

The check can safely be removed, as it won't do anything
useful anyway.

Also adapt a comment in SystemEnvironmentBuilder
which still refers to this variable/constant and its
usage in the helhum/typo3-secure-web package.
This statement can be removed as helhum/typo3-secure-web
is not actually using that constant/envvar.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Josef Glatz +1
  • Verified V +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Josef Glatz +1
    • TYPO3com +1 CI

Issues 2

Files 3

Review log 2126

Show 1 earlier messages
  1. Helmut Hummel uploaded patch set 1 04/27/20, 21:47

  1. TYPO3com voted on patch set 1 V +1 04/27/20, 21:58 Completed build in 11m 33s on Mon, 27 Apr, 09:58 PM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3071

  2. Benjamin Franzke commented on patch set 1 04/27/20, 22:06

    Thank you for cleaning that up! :) The SystemEnvironmentBuilder does also mention this constant and says that helhum/typo3-secure-web makes use of that: https://github.com/TYPO3/TYPO3.CMS/blob/v10.4.0/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php#L183-L185 I can't find it in the history of the mentioned repository. Can you shed some light on that topic/comment as well?
  3. Benjamin Franzke updated the commit message in patch set 2 04/27/20, 22:07

  4. TYPO3com voted on patch set 2 V -1 04/27/20, 22:19 Completed build in 12m 01s on Mon, 27 Apr, 10:19 PM Test Summary: 73336 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3073

  5. Benjamin Franzke uploaded patch set 3 04/27/20, 22:46

  6. TYPO3com voted on patch set 3 V +1 04/27/20, 22:58 Completed build in 12m 14s on Mon, 27 Apr, 10:58 PM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3074

  7. Benjamin Franzke voted on patch set 3 V +1 CR +1 04/27/20, 23:08

  8. Josef Glatz commented on patch set 3 CR -1 04/28/20, 04:38

    Good morning. I'm adding my -1 mainly not because of the small typo in the commit message. I really would love to have more infos about the ongoing work in this area around helhum/typo3-secure-web: I read that your secure web solution has been discontinued. What does that mean in the wild? Because I can't find infos in the source I want to ask here. I'm using it in v8,v9,v10 TYPO3 isntances ツ. Should the community stop using it now? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I and certainly many others use it successfully in TYPO3 v8,v9 and v10 instances. I've just tried the patch on a v10 project where I use helhum/typo3-console, helhum/typo3-secure-web, helhum/dotenv-connector (.env file where I removed the TYPO3_PATH_WEB env var) and TYPO3 10.4.1-dev with this patch with an "composer install" afterwards and it seems like it's working so far. I don't know if the reason is because of typo3-console set's the env var TYPO3_PATH_WEB or whether the patch doesn't aim to make the secure web solution useless in actually supported TYPO3 versions. Therefore the question ------------------------------------- Should we touch our project installations and deployment scripts right now? Or is it safe to keep them for at least we update to TYPO3 v11 in the future? Background: Because that would involve a lot of changes in projects but mainly composer setup, deployment scripts, test suite setups. > I would love to hear what are the plans with helhum/typo3-secure-web since it's often used by the community. In typo3/cms-base-distribution, in many tutorials and in test suites (to name a few: ext:news, ext:vhs). Beside all of that: Helmut, I want to say thank you for such a great secure TYPO3 solution. Please excuse me if my english sentences are not "friendly" in some places. I have given my best. Please contact me via slack if something is unclear of what I wrote.
    better? > and isn't supported for TYPO3 v9/v10
  9. Benjamin Franzke commented on patch set 3 04/28/20, 05:09

    Maybe this is just a misunderstanding from my site. I found that same identifier (TYPO3_PATH_WEB) and asked for clarification in https://review.typo3.org/c/Packages/TYPO3.CMS/+/64330/2..3#message-0a8873f43d259bb9f81c23376da1c5b6730c1d37 Because it was late I then tried to rephrase that myself (with the Helmut can approve or rephrase that) and assumed typo3-secure-web is discontinued because of the last sentence in the README: > While it would still be possible to require typo3/cms (the complete TYPO3 package) for TYPO3 version 8.7, it is not recommended any more and won't work with TYPO3 9. Let's see what Helmut says.. It seems that helhum/typo3-secure-web doesn't use the constant, nor the environment variable TYPO3_PATH_WEB at all, so that comment in SystemEnvironmentBuilder should be fine. Im fine with dropping the sentence that typo3-secure-web is discontinued if it is actually still working.
  10. Benni Mack commented on patch set 3 04/28/20, 05:30

    GeneralUtility.php:2780

    just by reading, the $url seems a bit ... "lost", if no Env::getCurrentScript() is set? $retVal is empty then
  11. Benjamin Franzke commented on patch set 3 04/28/20, 07:29

    I updated the commit message to not talk about a possible discontinuation, but rather about the fact that helhum/typo3-secure-web doesn't use that variable/constant.

    GeneralUtility.php:2780 Reply

    Right, moved it to the position where it was before the patch that introduced TYPO3_PATH_WEB: https://review.typo3.org/c/Packages/TYPO3.CMS/+/34264/
  12. Benjamin Franzke uploaded patch set 4 04/28/20, 07:31

  13. Benjamin Franzke commented on patch set 4 V +1 CR +1 04/28/20, 07:32

    Reply

    Removed that statement.

    GeneralUtility.php:2780 Reply

    Done
  14. Benni Mack commented on patch set 4 04/28/20, 07:40

    personally, I would keep this code for 9.5
  15. Benjamin Franzke updated the commit message in patch set 5 04/28/20, 07:42

  16. Benjamin Franzke commented on patch set 5 V +1 CR +1 04/28/20, 07:42

    Yup, master (10.4) only is fine. Also marked it as TASK, as it is not a real bugfix…
  17. Helmut Hummel commented on patch set 5 04/28/20, 08:04

    Indeed helhum/typo3-secure-web is the successor of the approach that needed such constant. This package never used this constant, as it wasn't necessary any more, so it will continue to work with all TYPO3 versions since 8.7
  18. Benni Mack commented on patch set 5 04/28/20, 08:07

    > Patch Set 5: > > Indeed helhum/typo3-secure-web is the successor of the approach that needed such constant. > This package never used this constant, as it wasn't necessary any more, so it will continue to work with all TYPO3 versions since 8.7 OK. The current commit message clarifies this!
  19. Benni Mack voted on patch set 5 CR +2 04/28/20, 08:07

  20. Josef Glatz voted on patch set 5 V +1 CR +1 04/28/20, 08:10

  21. Benni Mack commented on patch set 5 V +2 04/28/20, 08:11

    waiting for bamboo
  22. TYPO3com voted on patch set 4 V +1 04/28/20, 08:14 Completed build in 31m 03s on Tue, 28 Apr, 08:14 AM Test Summary: 73655 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3083

  23. TYPO3com voted on patch set 5 V +1 04/28/20, 08:18 Completed build in 34m 46s on Tue, 28 Apr, 08:18 AM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3084

  24. Benni Mack merged patch set 6 04/28/20, 08:19

  25. Josef Glatz commented on patch set 6 04/28/20, 08:44

    Thanks for the clarification!