Review main Abandoned

37308[TASK] Add GlobalsUtility class

mostwanted CR 0 V 0 Normal +71 −0 updated 05/15/15, 16:34

Commit message

It is good practice to use getters to get $GLOBALS array entries.
This (can) lead to quite some duplicated code both in the core of
TYPO3 CMS and 3rd party extensions. To avoid the need of this
duplicated code this commit adds a GlobalsUtility class with static
getters methods for those $GLOBALS array entries.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 6

  1. mostwanted uploaded patch set 1 02/27/15, 07:39

  2. mostwanted uploaded patch set 2 02/27/15, 07:40

  3. Mathias Brodala commented on patch set 1 CR -1 02/27/15, 07:42

    I don't like this approach since this imposes a burden to constantly extend this class with even more getters. One point of the local getter methods is to allow for easy mocking in tests. A class with static methods would revert this again. And in the mid/long term this topic needs to be tackled with dependency injection anyways.
  4. Wouter Wolters commented on patch set 2 CR -2 02/27/15, 07:43

    No, this is not good practice!
  5. mostwanted abandoned the change 02/27/15, 08:06

  6. Andy Grunwald commented on patch set 2 05/15/15, 16:34