36095[TASK] Add getter class for $GLOBALS
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 1
Review log 8
-
Andreas Kienast uploaded patch set 1 01/18/15, 14:24
-
Anja Leichsenring commented on patch set 1 CR -1 01/18/15, 14:36
Sorry, no static utility to handle GLOBALS. They need to be explicit in every class that uses them. -
Philipp Gampe commented on patch set 1 CR -1 01/18/15, 15:40
How about creating a trait GlobalGetter instead? This would not effect unit tests, but would allow us to keep the implementation at one place. In essence, traits are just a language way to implement copy&paste code. -
Oliver Klee commented on patch set 1 01/18/15, 15:40
+1 for this -
Markus Klein commented on patch set 1 CR -2 01/19/15, 01:28
The idea of the getters is to have explicit dependencies and to make those mockable. Introducing a static function again kills this benefit. Traits would maybe be an option. -
Christian Kuhn commented on patch set 1 CR -2 01/19/15, 13:27
Andreas, this approach will not make it. At the moment, we want to have the access to globals directly in the class that uses it, together with a local helper method. This way we at least can see very clean the dependency of a class to globals within the class directly. This is more about dependency injection and it also was not decided yet if we should use traits for that. -
Andreas Kienast commented on patch set 1 01/19/15, 13:29
Ok, no problem. I will abandon it -
Andreas Kienast abandoned the change 01/19/15, 13:29