Review main Merged

69017[TASK] Remove usages of call_user_func() and call_user_func_array()

crell CR +2 V +2 Normal +49 −58 updated 05/07/21, 20:14

Commit message

Using direct calls and variadics is slightly faster, and usually cleaner to read.

I left in the instant-call call_user_func() instances in the entry point files, as
that's only a single call and is arguably at least no worse than (function() {})().

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • crell +1
  • Verified V +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • core-ci +1 CI

Issues 1

Files 29

Show 9 more files

Review log 1419

  1. crell uploaded patch set 1 05/04/21, 17:05

  2. core-ci voted on patch set 1 V +1 05/04/21, 17:17 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11137

  3. Benni Mack commented on patch set 1 05/04/21, 18:10

    you need to exclude the gitmessage.txt and .run/ddev-typo3.run.xml I guess.
  4. crell commented on patch set 1 05/04/21, 20:51

    Reply

    Bah. Why aren't those in .gitignore already?
  5. crell uploaded patch set 2 05/04/21, 20:55

  6. core-ci voted on patch set 2 V +1 05/04/21, 21:08 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11170

  7. Benni Mack voted on patch set 2 V +1 CR +1 05/05/21, 14:36

  8. Benjamin Franzke commented on patch set 2 CR -1 05/06/21, 21:47

    FileNameFilter.php:35

    " (if we adapt opening „ to ", then we should also change “ to ").

    DriverFilteredSearchResult.php:145

    "

    GeneralUtility.php:631

    One call_user_func missed here.

    FormProtectionFactoryTest.php:93

    Let's use regular static invocation: FormProtectionFactory::get(...$arguments);

    LoggerTest.php:162

    More readable would be: $logger->{$shorthandMethod}('test message')

    ObjectConverter.php:260

    $this->objectManager->get(...

    PropertyMappingConfigurationTest.php:226

    $this->propertyMappingConfiguration->{$methodToTestForFluentInterface}

    FileFacade.php:101

    $this->resource->{$method}(); (also all other cases in this file)

    RecyclerModuleController.php:126

    $this->{$action . 'Action'}($request);
  9. crell uploaded patch set 3 05/07/21, 14:25

  10. crell commented on patch set 2 05/07/21, 14:25

    Thanks. Issues fixed, and rebased on master for good measure.

    FileNameFilter.php:35 Reply

    Ack

    DriverFilteredSearchResult.php:145 Reply

    Ack

    GeneralUtility.php:631 Reply

    Ack

    FormProtectionFactoryTest.php:93 Reply

    I dunno what I was thinking there. Or what the original code was thinking, either. :)

    LoggerTest.php:162 Reply

    Ack

    ObjectConverter.php:260 Reply

    Ack

    PropertyMappingConfigurationTest.php:226 Reply

    Ack

    FileFacade.php:101 Reply

    Ack

    RecyclerModuleController.php:126 Reply

    Ack
  11. core-ci voted on patch set 3 V -1 05/07/21, 14:27 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11291

  12. crell uploaded patch set 4 05/07/21, 14:33

  13. core-ci voted on patch set 4 V +1 05/07/21, 14:43 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11292

  14. Benjamin Franzke voted on patch set 4 CR +1 05/07/21, 19:12

  15. Benjamin Franzke uploaded patch set 5 05/07/21, 19:37

  16. core-ci voted on patch set 5 V +1 05/07/21, 19:49 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11299

  17. crell voted on patch set 5 CR +1 05/07/21, 20:00

  18. Benni Mack voted on patch set 5 V +2 CR +2 05/07/21, 20:14

  19. Benni Mack merged patch set 6 05/07/21, 20:14