Commit graph

1 commit

Author SHA1 Message Date
Timo Tijhof
43e3a6460b Pingback: Refactor for dependency injection and cover with tests
* Inject dependencies from the constructor and use those instead.

* Make getSystemInfo() static since its sole purpose is to collect
  global state. This also means it can be safely called from the
  Installer without needing to construct this class and its unsafe
  dependencies as the Installer was doing previously.

* Remove private 'id' member. This cached the fetchOrInsertId()
  return value but was never used.

* Remove selectField() fallback IGNORE-mode insert from fetchOrInsertId().
  This existed to handle concurrent writes, but this isn't possible
  since all this runs inside a DB_MASTER lock.

* Add missing call to $cache->makeKey().
  Avoid passing unformatted strings directly to BagOStuff methods.

Bug: T270540
Change-Id: I984526020ea4d5f0fd6f72b6be527edaf6ab0917
2020-12-22 19:13:53 +00:00