Review main Merged

57161[TASK] Use Environment API instead of PATH_site for Cache Backends

Benni Mack CR +2 V +2 Normal +23 −44 updated 06/13/18, 14:37

Commit message

The new Environment API is now used to define hashes or base paths
in cache backend classes.

Review

  • Code review CR +2
    • Tymoteusz Motylewski +2
    • Wouter Wolters +1
    • Christian Kuhn +1
  • Verified V +2
    • Tymoteusz Motylewski +2
    • Christian Kuhn +1
    • TYPO3com +1 CI

Issues 1

Files 5

Review log 1620

  1. Benni Mack uploaded patch set 1 06/09/18, 15:59

  2. TYPO3com voted on patch set 1 V -1 06/09/18, 16:07 Completed build in 08m 17s on Sat, 9 Jun, 06:07 PM Test Summary: 12 of 32940 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24219

  3. Benni Mack uploaded patch set 2 06/09/18, 17:11

  4. TYPO3com voted on patch set 2 V -1 06/09/18, 17:12 Completed build in 09s on Sat, 9 Jun, 07:12 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24224

  5. Benni Mack uploaded patch set 3 06/09/18, 17:12

  6. TYPO3com voted on patch set 3 V +1 06/09/18, 17:20 Completed build in 07m 21s on Sat, 9 Jun, 07:20 PM Test Summary: 32689 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24225

  7. Christian Kuhn commented on patch set 3 CR -1 06/09/18, 21:34

    SimpleFileBackend.php:120

    sure it's ok to use project path here? shouldn't the cache files end up in var path?

    FileBackendTest.php:98

    quite frankly i'm not a huge fan of having the Environment calls within the unit tests all over the place. if we decide to go for it, (unit) test bootstrap should initialize that class with good detais.
  8. Benni Mack commented on patch set 3 06/10/18, 19:10

    SimpleFileBackend.php:120 Reply

    var() folder is used as default, however setCacheDirectory() is used to either set it to a fully different (absolute path) or something within PATH_site, or now within "getProjectPath()" which is IMHO even encouraged to be allowed.

    FileBackendTest.php:98 Reply

    ack, but how to get rid of the irrelevant PATH_site constants in the tests then?
  9. Christian Kuhn commented on patch set 3 CR 0 06/10/18, 20:03

    SimpleFileBackend.php:120 Reply

    kk.

    FileBackendTest.php:98 Reply

    not really sure, but i think test bootstrap should probably explicitely set Environment state once, i'm currently unsure if that is done within unit tests already in a good way. will let that sink through my head for a while. however, i'll unblock the patch for the time being. in case we decide differently for within test scope, we'll just adapt the tests if needed.
  10. Christian Kuhn voted on patch set 3 V +1 CR +1 06/11/18, 09:09

  11. Tymoteusz Motylewski commented on patch set 3 CR -1 06/11/18, 09:45

    on it
  12. Tymoteusz Motylewski commented on patch set 3 CR 0 06/11/18, 10:46

    SimpleFileBackend.php:120 Reply

    why fixWindowsFilePath is needed here? I would expect that getProjectPath returns sth OK in all environments.

    SimpleFileBackend.php:126

    why don't we need fixWindowsFilePath here?
  13. Alexander Opitz commented on patch set 3 CR -1 06/11/18, 12:43

    Course of the questions from Tymoteusz Motylewski
  14. Benni Mack commented on patch set 3 06/12/18, 13:06

    SimpleFileBackend.php:120 Reply

    not needed here, correct.

    SimpleFileBackend.php:126 Reply

    see str_replace above - taking care of that already.
  15. Benni Mack uploaded patch set 4 06/12/18, 15:24

  16. TYPO3com voted on patch set 4 V +1 06/12/18, 15:33 Completed build in 08m 59s on Tue, 12 Jun, 05:33 PM Test Summary: 32673 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24374

  17. Christian Kuhn voted on patch set 4 V +1 CR +1 06/12/18, 17:41

  18. Wouter Wolters voted on patch set 4 CR +1 06/12/18, 18:01

  19. Tymoteusz Motylewski voted on patch set 4 V +2 CR +2 06/13/18, 14:37

  20. Tymoteusz Motylewski merged patch set 5 06/13/18, 14:37