Review main Merged

55018[BUGFIX] Only scan package base paths if subdirectories exist

Michael Oehlhof CR +2 V +2 Easy +13 −2 updated 02/05/18, 21:57

Commit message

Include possible package base paths only if subdirectories are available.
Otherwise no extension can be found in the base path anyway.

Review

  • Code review CR +2
    • Andreas Kienast +2
    • Mathias Schreiber +1
  • Verified V +2
    • Andreas Kienast +2
    • Mathias Schreiber +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 3848

Show 1923 earlier messages
  1. Michael Oehlhof uploaded patch set 1 12/10/17, 22:04

  2. TYPO3com voted on patch set 1 V +1 12/10/17, 22:14 Completed build in 10m 03s on Sun, 10 Dec, 11:14 PM Test Summary: 57075 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17532

  3. Mathias Brodala commented on patch set 1 CR -1 12/11/17, 13:35

    PackageManager.php:361

    Instead of a huge try...catch we could also add a is_dir() call ourself and "continue;" if a directory is missing.

    PackageManager.php:370

    In any case the try...catch should not wrap this part.
  4. Michael Oehlhof commented on patch set 1 12/11/17, 22:06

    PackageManager.php:361 Reply

    Using is_dir() directly is not enough. The $packageBasePath is ".../typo3conf/ext/*/" so we have to get all directories matching the pattern and then check if the count is >0.

    PackageManager.php:370 Reply

    If the try..catch only covers lines 362-367 than an exception occcurs at line 370 (foreach)
  5. Mathias Brodala commented on patch set 1 CR 0 12/12/17, 08:31

    PackageManager.php:361 Reply

    Thanks for the hint, I didn't check whether we use wildcards here.

    PackageManager.php:370 Reply

    Indeed, for glob patterns there is no immediate is_dir() check in Symfony Finder.
  6. Mathias Schreiber commented on patch set 1 02/04/18, 20:39

    can somebody fill me in on the blank here? I don't get an exception with an empty typo3conf/ext/ directory.
  7. Tobi Kretschmann commented on patch set 1 02/05/18, 10:59

    same here. can't reproduce the described behavior in current dev-master. Neither with missing ext directory nor with empty ext directory.
  8. Benni Mack commented on patch set 1 02/05/18, 11:46

    just by reading: this would fail on all our systems bc we never have typo3/ext available either.
  9. Markus Klein commented on patch set 1 02/05/18, 12:01

    I can't add the reporter Nico Wellner here as reviewer. Let's ask him, how to reproduce
  10. Nicole Hummel commented on patch set 1 CR -2 02/05/18, 12:03

    I cannot verify the problem. Neither with master nor reported 8.7. Furthermore there is already an implemented check for existing paths in getPackageBasePaths()
  11. Michael Oehlhof commented on patch set 1 02/05/18, 13:20

    Checked again for reproducing this issue. If there are no extensions installed and the typo3conf/ext directory is empty there is no exception. If there is any file in the typo3conf/ext directory (no subdirectories, only a file in the ext directory) than the exception occurs.
  12. Mathias Schreiber uploaded patch set 2 02/05/18, 13:59

  13. Markus Klein commented on patch set 2 02/05/18, 14:06

    PackageManager.php:370

    lets hardcode that to empty array
  14. Markus Klein commented on patch set 2 02/05/18, 14:06

    fix in 8 too?
  15. Mathias Brodala updated the commit message in patch set 3 02/05/18, 14:09

  16. TYPO3com voted on patch set 2 V +1 02/05/18, 14:09 Completed build in 09m 08s on Mon, 5 Feb, 03:09 PM Test Summary: 30392 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18940

  17. Mathias Schreiber commented on patch set 3 02/05/18, 14:11

    I talked to Nicole. Her approach is to sanitize before Finder() even starts. I agree with that approach and will come up with a solution.
  18. Reiner Teubner commented on patch set 3 V +1 CR +1 02/05/18, 14:14

    If only a file exists in 'typo3conf/ext/' like 'asdf.txt' without any extentsion installed / downloaded then an error is shown. The patch prevent the error message.
  19. TYPO3com voted on patch set 3 V +1 02/05/18, 14:17 Completed build in 07m 58s on Mon, 5 Feb, 03:17 PM Test Summary: 30392 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18941

  20. Mathias Schreiber uploaded patch set 4 02/05/18, 14:53

  21. Mathias Schreiber commented on patch set 4 02/05/18, 14:54

    After talking to nicole this is her approach. I agree that catching the underlying error does not make sense and should be fixed closer to its source. I just failed to see it in the first place.
  22. Mathias Brodala commented on patch set 4 02/05/18, 14:56

    PackageManager.php:1071

    I wonder if this can be simplified with glob() and the final path which is added to $this->packagesBasePaths above which contains a wildcard pattern already. Even if not, this should stop at the first directory.
  23. TYPO3com voted on patch set 4 V -1 02/05/18, 15:00 Completed build in 06m 41s on Mon, 5 Feb, 04:00 PM Test Summary: 1 of 30547 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18944

  1. Mathias Schreiber commented on patch set 4 02/05/18, 15:12

    PackageManager.php:1071 Reply

    in the sense of "if you found one dir, return 3"? The array needs to be built, there's no way around that, but foreach-ing and breaking early could work. I'd rename the method, though.
  2. Nicole Hummel commented on patch set 4 CR 0 02/05/18, 15:34

    The patch now goes in the right direction. Thus removing my blocking vote.
  3. Mathias Schreiber uploaded patch set 5 02/05/18, 17:06

  4. Mathias Schreiber commented on patch set 5 02/05/18, 17:07

    From what I can see this seems to be the fastest way I could come up with. Input is welcome.
  5. Tobi Kretschmann voted on patch set 5 CR +1 02/05/18, 17:11

  6. TYPO3com voted on patch set 5 V +1 02/05/18, 17:12 Completed build in 05m 49s on Mon, 5 Feb, 06:12 PM Test Summary: 30416 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18947

  7. Mathias Schreiber updated the commit message in patch set 6 02/05/18, 17:48

  8. TYPO3com voted on patch set 6 V +1 02/05/18, 17:55 Completed build in 07m 45s on Mon, 5 Feb, 06:55 PM Test Summary: 30416 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18949

  9. Nicole Hummel uploaded patch set 7 02/05/18, 21:01

  10. Mathias Schreiber commented on patch set 7 V +1 CR +1 02/05/18, 21:03

    neat
  11. Nicole Hummel uploaded patch set 8 02/05/18, 21:03

  12. TYPO3com voted on patch set 7 V -1 02/05/18, 21:03 Completed build in 01m 58s on Mon, 5 Feb, 10:03 PM Test Summary: 2728 of 2801 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18978

  13. Mathias Schreiber voted on patch set 8 V +1 CR +1 02/05/18, 21:05

  14. TYPO3com voted on patch set 8 V +1 02/05/18, 21:09 Completed build in 05m 38s on Mon, 5 Feb, 10:09 PM Test Summary: 30416 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18979

  15. Andreas Kienast updated the commit message in patch set 9 02/05/18, 21:12

  16. Andreas Kienast voted on patch set 9 V +1 CR +1 02/05/18, 21:17

  17. Nicole Hummel updated the commit message in patch set 10 02/05/18, 21:18

  18. Andreas Kienast voted on patch set 10 V +1 CR +1 02/05/18, 21:19

  19. TYPO3com voted on patch set 9 V +1 02/05/18, 21:21 Completed build in 08m 36s on Mon, 5 Feb, 10:21 PM Test Summary: 30416 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18980

  20. Mathias Schreiber voted on patch set 10 V +1 CR +1 02/05/18, 21:21

  21. TYPO3com voted on patch set 10 V +1 02/05/18, 21:28 Completed build in 10m 37s on Mon, 5 Feb, 10:28 PM Test Summary: 30416 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18981

  22. Andreas Kienast voted on patch set 10 V +2 CR +2 02/05/18, 21:29

  23. Andreas Kienast merged patch set 11 02/05/18, 21:29

  24. Andreas Kienast commented on patch set 11 02/05/18, 21:29

    Cherry Picked This patchset was cherry picked to branch TYPO3_8-7 as commit 1d7f3f4a1af5c2988305b28211469675ca2eb110
  25. Nicole Hummel commented on patch set 11 02/05/18, 21:57

    For the record: a backport to 7.6 is not necessary as the base path resolving is safe already.