Skip to content

Replace globals db, g_func, g_view_utils with DI

Matthias Larisch requested to merge replace-global into master

Uses DI for those ex-global functions/classes.

This also includes refactoring the routing for non-xhrapp front routers (index, xhr, run) using a lookup table as well as moving all language files into files named after their module names (fixing the case-sensitivity clash on Mac).

Some unused methods are removed, some used once are shifted around in modules to have lesser injected dependencies/better structured modules.

How confident are you it won't break things if deployed?

I don't really know :-) We will see. Tests seem to work.

The behaviour of setting the default location on the food baskets map (/essenskoerbe/) might be changed - please have an eye on it (default with/without session, with/without allowing browser to set location)

Links to related issues

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
Edited by Chris Oelmueller

Merge request reports