Review main Merged

64100[BUGFIX] Disable extension scanner if no extensions are available

Josef Glatz CR +2 V +2 Easy +14 −4 updated 04/11/20, 23:07

Commit message

The link to the extension file scanner is removed to avoid any
exception when running a scan if no extension is available at all.

Visually, it's grayed out like the disabled "Update TYPO3 Core"
card in composer mode and the link is removed.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Oli Bartsch +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 1619

  1. Josef Glatz uploaded patch set 1 04/08/20, 12:31

  2. Josef Glatz commented on patch set 1 04/08/20, 12:32

    This change is ready for review.
  3. Georg Ringer voted on patch set 1 CR +1 04/08/20, 12:35

  4. Josef Glatz commented on patch set 1 04/08/20, 12:47

    > Patch Set 1 Screenshot 📸 added: https://forge.typo3.org/issues/90981#note-3
  5. TYPO3com voted on patch set 1 V +1 04/08/20, 12:52 Completed build in 20m 40s on Wed, 8 Apr, 12:52 PM Test Summary: 73363 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2296

  6. Simon Gilli commented on patch set 1 04/08/20, 16:06

    imho this is a bugfix because it avoids a exception which was shown before.
  7. Oli Bartsch commented on patch set 1 V -1 04/08/20, 19:05

    This is not

    UpgradeController.php:206

    This is not sufficient as this is true as soon as there is a folder in the extension path. No matter if it's a real extension. I suggest checking with e.g. ListUtility::getAvailableExtensions('Local'). Besides that, is it really necessary to beam up the Finder here, for this simple use case, instead of just using native php? I think `count(glob(Environment::getExtensionsPath(). '/*', GLOB_ONLYDIR)` would do the same job here. This is however what the Finder is also doing internally.
  8. Georg Ringer commented on patch set 1 CR -1 04/08/20, 19:09

    UpgradeController.php:206 Reply

    I would be in favor of the finder but we can skip the ->sortbyName if we are just interested in the count anyway

    UpgradeController.php:207

    I would however prefer removing that information because 1) the absolute path on the server can be quite long and that won't look good in those boxes 2) there is not really a benefit in showing the absolute path
  9. Josef Glatz commented on patch set 1 CR -1 04/09/20, 08:19

    on it, thx folks!

    Reply

    Ack
  10. Josef Glatz uploaded patch set 2 04/09/20, 09:09

  11. Josef Glatz commented on patch set 2 04/09/20, 09:09

    Reply

    Done

    UpgradeController.php:206 Reply

    I'm against using ListUtility::getAvailableExtensions('Local'), because this requires to have every minimal extension requirement to be met. The Finder is used in the same way as in the extension scanner itself. So I would nothing change here – except removing the "sortbyName". If I want to check some PHP files against the extension scanner, it's actually possible to add a folder with the Classes folders without any ext_emconf.php. Such thing is another issue/patch if this needs to be adjusted.

    UpgradeController.php:207 Reply

    - removed - I've removed it completely – keeping it short
  12. Oli Bartsch uploaded patch set 3 04/09/20, 09:55

  13. Oli Bartsch voted on patch set 3 V +1 CR +1 04/09/20, 09:55

  14. Josef Glatz commented on patch set 3 04/09/20, 10:13

    Thank you
  15. TYPO3com voted on patch set 2 V +1 04/09/20, 10:17 Completed build in 1h 00m 18s on Thu, 9 Apr, 10:17 AM Test Summary: 73369 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2338

  16. TYPO3com voted on patch set 3 V +1 04/09/20, 10:33 Completed build in 26m 03s on Thu, 9 Apr, 10:33 AM Test Summary: 73369 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2340

  17. Georg Ringer voted on patch set 3 V +1 CR +1 04/09/20, 11:02

  18. Benni Mack voted on patch set 3 V +2 CR +2 04/11/20, 23:07

  19. Benni Mack merged patch set 4 04/11/20, 23:07