Review main Merged

63276[TASK] Ignore phpstan errors to achieve level 0 compatibility

Alexander Schnitzler CR +2 V +2 Easy +40 −4 updated 02/21/20, 14:57

Commit message

This patch ignores several errors found by phpstan which are
not easy to solve as of now or which are not solvable at all.

- Unsafe usage of new static

  Those errors can be solved in different ways. Making classes
  final, making constructors final or using new self. Which
  solution is used has to be decided by people who are familiar
  which the affected files.

- Call to an undefined method in AbstractWidgetViewHelper and
  AbstractViewHelper

  Those issues aren't solvable as those methods exist if users
  choose fluid ^3.

- Access to undefined constant TYPO3\CMS\Core\Type\Enumeration
  ::__default

  This issue can't be solved as the Enumeration class does a
  lot of magic stuff which isn't compatible with static code
  analysis.

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Mathias Brodala +1
    • Susi Moog +1
    • Benni Mack +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Susi Moog +1
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 4

Review log 1315

  1. Alexander Schnitzler uploaded patch set 1 02/17/20, 09:58

  2. Alexander Schnitzler wrote 02/17/20, 09:59

    Topic set to phpstan
  3. Mathias Brodala commented on patch set 1 02/17/20, 10:04

    AbstractRecordCollection.php:345 Unresolved

    This must be "final" instead, the constructor does not need to be private for this.
  4. Alexander Schnitzler uploaded patch set 2 02/17/20, 10:08

  5. TYPO3com voted on patch set 1 V +1 02/17/20, 10:12 Completed build in 14m 33s on Mon, 17 Feb, 10:12 AM Test Summary: 71295 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-194

  6. Mathias Brodala voted on patch set 2 CR +1 02/17/20, 10:13

  7. TYPO3com voted on patch set 2 V +1 02/17/20, 10:27 Completed build in 16m 04s on Mon, 17 Feb, 10:27 AM Test Summary: 71295 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-196

  8. Alexander Schnitzler commented on patch set 2 02/20/20, 09:18

    ping
  9. Benni Mack voted on patch set 2 V +1 CR +1 02/20/20, 18:50

  10. Susi Moog voted on patch set 2 CR +1 02/21/20, 13:47

  11. Daniel Goerz commented on patch set 2 02/21/20, 13:53

    I still get 1 error: ----- ---------------------------------------------------------------------------------- Line extbase/Classes/Property/TypeConverter/ObjectConverter.php ------ -------------------------------------------------------------------------------- 135 Method TYPO3\CMS\Extbase\Property\TypeConverter\ObjectConverter::getTypeOfChildProperty() should return string but return statement is missing. ------ --------------------------------------------------------------------------------
  12. Daniel Goerz commented on patch set 2 02/21/20, 14:57

    Alex will take care of the remaining error later
  13. Daniel Goerz voted on patch set 2 V +2 CR +2 02/21/20, 14:57

  14. Susi Moog voted on patch set 2 V +1 02/21/20, 14:57

  15. Daniel Goerz merged patch set 3 02/21/20, 14:57