Page MenuHomePhabricator

Consider Singleton Usage
Closed, InvalidPublic4 Estimated Story Points

Description

Little personal bias, but I really dislike Singletons.

The good news is that we don't use very many. The only ones that concern me are

  • SessionSingleton
  • QueuesSingleton

Despite my personal feelings, I think singleton use falls into the "if it's not broke, don't fix it category". However if they do become problematic (in unit tests commonly), or we end up needing more, I advocate for looking at Dependency Injection as an alternative