Issue Feature Closed

#91600Unify the handling of Singletons by applying the *Aware design pattern

Tizian Schmidlin 06/06/20, 16:37 updated 01/06/23, 14:08

Description

I’ve stumbled across some low hanging fruits and chances while working on indexed_search and one of them was to have an easy way to add the support for the TimeTracker at some places, rather than having to rely on a parent object to use it. A simple way to do so would be to set up a TimeTrackerAwareTrait which would allow developers to quickly add support for such a functionality, in the same vain as TYPO3 already does it for the Logger.

I think that there are some other places where this could make sense, namely for all singleton classes that are used in a general context, some examples would be:
  • TimeTracker
  • FlashMessageService
  • ConfigurationManager (<= not sure about this one)
  • CacheService
  • …

The list goes on and could probably be extended by some more but you get the gist.

As I need it now, I’ll provide the TimeTrackerAwareTrait myself.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.