Review main Merged

63068[BUGFIX] Avoid PHP notices in unit tests

Benni Mack CR +2 V +2 Normal +33 −31 updated 01/29/20, 21:35

Commit message

When commenting out the line

  SystemEnvironmentBuilder::initializeBasicErrorReporting()

then Unit Tests run with notices, showing notices as errors.

This happened due to recent updates of the TYPO3 testing framework v6.

The fix to overcome this is https://review.typo3.org/c/Packages/TYPO3.CMS/+/62926
but the preferred clean ups are done beforehand.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Oliver Hader +2
    • TYPO3com +1 CI

Issues 1

Files 9

Review log 1620

  1. Benni Mack uploaded patch set 1 01/29/20, 14:05

  2. Oliver Klee commented on patch set 1 01/29/20, 14:11

    EmailLoginNotification.php:106 Unresolved

    This is a change in behavior, not only a warning fix.

    Typo3Information.php:40 Unresolved

    As this is an object, I'd propose to use null as the fallback, not an empty string.

    PageRouter.php:514 Unresolved

    What types does the array contain? (The fallback should be of the same type.)

    ExtensionManagementService.php:319 Unresolved

    If the array element is not set, does it make sense to continue here at all, or should we make this a guard clause with an early return instead?

    EmConfUtilityTest.php:60 Unresolved

    I feel honored. ;-)
  3. TYPO3com voted on patch set 1 V +1 01/29/20, 14:18 Completed build in 12m 55s on Wed, 29 Jan, 02:18 PM Test Summary: 70828 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40322

  4. Benni Mack uploaded patch set 2 01/29/20, 15:07

  5. Benni Mack commented on patch set 1 01/29/20, 15:08

    Thanks for the feedback, I incorporated your questions and made all code more clear, as you proposed. Thanks!
  6. Oliver Klee commented on patch set 2 CR +1 01/29/20, 15:23

    Neat!
  7. TYPO3com voted on patch set 2 V +1 01/29/20, 15:29 Completed build in 20m 58s on Wed, 29 Jan, 03:29 PM Test Summary: 70828 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40327

  8. Oliver Hader commented on patch set 2 01/29/20, 16:31

    PageRouter.php:242 Unresolved

    Should not have had any effect... did it?

    LegacyLinkNotationConverterTest.php:307 Unresolved

    Nice, PHP 7.4 compat

    ExtensionManagementService.php:320

    singular $path, correct?
  9. Oliver Hader uploaded patch set 3 01/29/20, 18:20

  10. Oliver Hader voted on patch set 3 V +1 CR +1 01/29/20, 18:21

  11. Oliver Hader commented on patch set 3 01/29/20, 18:23

    ExtensionManagementService.php:320 Reply Unresolved

    Moved it up... if $paths are empty, $path is as well, thus settings the property is avoided
  12. Oliver Klee commented on patch set 3 CR -1 01/29/20, 18:28

    ExtensionManagementService.php:323

    My initial comment referred to the case where $path is an empty string, and where it might not make sense to execute the lines after line 322. So it should the empty check should be fore $path, not $paths, and the check should be after the line where $path is set to an empty string.
  13. TYPO3com voted on patch set 3 V +1 01/29/20, 18:33 Completed build in 12m 02s on Wed, 29 Jan, 06:33 PM Test Summary: 70840 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40337

  14. Oliver Hader commented on patch set 3 01/29/20, 18:34

    ExtensionManagementService.php:323 Reply Unresolved

    Sorry, I overlooked that comment...
  15. Oliver Hader uploaded patch set 4 01/29/20, 18:35

  16. Oliver Hader voted on patch set 4 V +1 CR +1 01/29/20, 18:36

  17. TYPO3com voted on patch set 4 V +1 01/29/20, 18:48 Completed build in 13m 10s on Wed, 29 Jan, 06:48 PM Test Summary: 70840 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40338

  18. Oliver Hader voted on patch set 4 V +2 CR +2 01/29/20, 19:43

  19. Oliver Hader merged patch set 5 01/29/20, 19:43

  20. Oliver Klee voted on patch set 5 CR +1 01/29/20, 21:35