Review main Merged

63039[TASK] Add a couple of code cleanups for phpstan

Alexander Schnitzler CR +2 V +2 Easy +11 −3 updated 01/29/20, 19:40

Commit message

- Add phpdoc for variables to let phpstan know their type
- Do not use ::class syntax for PHP 7.4 classes (yet)
- Add missing class properties
- Do not unset non-existing variables

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +1
    • Oliver Klee +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 6

Review log 1519

  1. Alexander Schnitzler uploaded patch set 1 01/25/20, 17:20

  2. TYPO3com voted on patch set 1 V +1 01/25/20, 17:31 Completed build in 10m 45s on Sat, 25 Jan, 05:31 PM Test Summary: 70582 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40231

  3. Alexander Schnitzler wrote 01/25/20, 17:33

    Topic set to phpstan
  4. Oliver Klee voted on patch set 1 CR +1 01/25/20, 19:23

  5. Tymoteusz Motylewski updated the commit message in patch set 2 01/25/20, 21:44

  6. TYPO3com voted on patch set 2 V -1 01/25/20, 21:53 Completed build in 08m 59s on Sat, 25 Jan, 09:53 PM Test Summary: 70304 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40236

  7. TYPO3com voted on patch set 2 V +1 01/26/20, 07:17 Completed build in 9h 42m 00s on Sun, 26 Jan, 07:17 AM Test Summary: 70582 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40236

  8. Susi Moog voted on patch set 2 CR +1 01/26/20, 07:45

  9. Susi Moog commented on patch set 2 CR -1 01/26/20, 08:26

    CrawlerHook.php:67 Unresolved

    not sure how this is used from the crawler extension and in fact whether this whole class could not be thrown away anyway - see https://github.com/AOEpeople/crawler/blob/typo3v9/Classes/Hooks/IndexedSearchCrawlerHook.php

    BrowseLinksController.php:104 Unresolved

    throw away? from what I can see this just gets set but nothing happens with it.
  10. Alexander Schnitzler commented on patch set 2 01/26/20, 16:59

    Hi Tomas, can you shed some light on the questions Susi raised concerning the Crawler related Hooks in the Core. Are those classes still needed in TYPO3 10?
  11. Alexander Schnitzler uploaded patch set 3 01/26/20, 16:59

  12. TYPO3com voted on patch set 3 V +1 01/26/20, 17:09 Completed build in 09m 06s on Sun, 26 Jan, 05:09 PM Test Summary: 70600 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40242

  13. Oliver Klee voted on patch set 3 CR +1 01/26/20, 20:05

  14. Tomas Norre Mikkelsen commented on patch set 3 01/28/20, 15:06

    When looking at: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61431/17/typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php It looks like this can be removed later on, but not yet. Tizian already tried to have it removed, but got abandon. So it's clearly wanted later on. https://review.typo3.org/c/Packages/TYPO3.CMS/+/61444
  15. Benni Mack commented on patch set 3 01/28/20, 17:36

    BrowseLinksController.php:125 Unresolved

    this is actually in a comment in the AbstractElementBrowser. But since it's not used, we could/should remove the comment as well. nice findings
  16. Georg Ringer voted on patch set 3 V +1 CR +1 01/29/20, 05:40

  17. Benjamin Franzke voted on patch set 3 V +2 CR +2 01/29/20, 15:53

  18. Benjamin Franzke merged patch set 4 01/29/20, 15:53

  19. Oliver Hader commented on patch set 4 01/29/20, 19:40

    PropertyType.php:188 Unresolved

    That was unrelated to PHP 7.4, "WeakReference" stems from 2009 and is just a term, not a class...