Review main Merged

62851[TASK] composer require --dev phpstan/phpstan

Alexander Schnitzler CR +2 V +2 Easy +33 −7 updated 01/17/20, 14:17

Commit message

This commit introduces a development requirement to
phpstan/phpstan to enable static code analysis.

A basic configuration file has been added as well to
identify most basic errors in the TYPO3 code base.

Review

  • Code review CR +2 Done
    • Frank Nägler +2
    • Oliver Klee +1
    • Sascha Egerer +1
    • Jörg Bösche +1
    • Felix P. +1
    • Steffen Frese +1
  • Verified V +2 Done
    • Frank Nägler +2
    • Sascha Egerer +1
    • Felix P. +1
    • Steffen Frese +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 1619

  1. Alexander Schnitzler uploaded patch set 1 01/12/20, 15:12

  2. Alexander Schnitzler wrote 01/12/20, 15:15

    Topic set to phpstan
  3. TYPO3com voted on patch set 1 V +1 01/12/20, 15:20 Completed build in 08m 25s on Sun, 12 Jan, 03:20 PM Test Summary: 69203 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39820

  4. Alexander Schnitzler uploaded patch set 2 01/12/20, 15:21

  5. TYPO3com voted on patch set 2 V +1 01/12/20, 15:29 Completed build in 08m 11s on Sun, 12 Jan, 03:29 PM Test Summary: 69203 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39821

  6. Jörg Bösche voted on patch set 2 CR +1 01/13/20, 11:08

  7. Mathias Brodala voted on patch set 2 CR +1 01/13/20, 11:40

  8. Sascha Egerer commented on patch set 2 CR -1 01/13/20, 14:55

    phpstan.neon:14 Unresolved

    Why not bootstrap TYPO3 so the constants are loaded, like i do in my TYPO3 phpstan package?

    phpstan.neon:15 Unresolved

    We are using regex here. so `.` should be escaped, right?

    phpstan.neon:18 Unresolved

    Why `._EXTKEY`? Is that by intention "any character + _EXTKEY"? Should that be limited to a specific list of filenames?

    phpstan.neon:20 Unresolved

    IMO thats to generic
  9. Alexander Schnitzler commented on patch set 2 01/13/20, 17:43

    FYI: I took most of the configuration file from Benjamin Franzke's phpstan branch: https://github.com/bnf/TYPO3.CMS/commits/phpstan-v2 Personally I am fine with even not defining any exclude rules at all and then step by step fix the issues, including the mentioned declaration of constants.
  10. Alexander Schnitzler uploaded patch set 3 01/16/20, 14:32

  11. TYPO3com voted on patch set 3 V +1 01/16/20, 14:42 Completed build in 09m 47s on Thu, 16 Jan, 02:42 PM Test Summary: 70365 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40047

  12. Oliver Klee voted on patch set 3 CR +1 01/16/20, 15:10

  13. Steffen Frese voted on patch set 3 V +1 CR +1 01/17/20, 05:12

  14. Felix P. voted on patch set 3 V +1 CR +1 01/17/20, 06:34

  15. Sascha Egerer voted on patch set 3 V +1 CR +1 01/17/20, 07:59

  16. Jörg Bösche voted on patch set 3 CR +1 01/17/20, 13:43

  17. Frank Nägler commented on patch set 3 01/17/20, 14:14

    @Alex: What do you think about https://github.com/mavimo/phpstan-junit Looks like we could get the results displayed in bamboo and could integrate this in the pre-merge tests. (not yet, but later in an own patch) just an idea.
  18. Frank Nägler voted on patch set 3 V +2 CR +2 01/17/20, 14:17

  19. Frank Nägler merged patch set 4 01/17/20, 14:17