1) The RepositoryLocaleTrait methods are not on any of the repository interfaces
2) Having setters for default locale / fallback locale introduces unnecessary state.
3) Having a trait in the first place requires us to copy it over to addressing once we move countries there.
4) We want to copy the repository locale approach to the NumberFormatter once we refactor it, but having extra methods there adds too much noise.
5) NumberFormatRepository has a default locale that isn't even used.
Solution:
Inject $defaultLocale and $fallbackLocale via constructors (only $fallbackLocale in the case of NumberFormatRepository). No getters/setters. This emphasizes that these are application settings that come from outside.
50 made some progress, but we have more problems:
1) The RepositoryLocaleTrait methods are not on any of the repository interfaces 2) Having setters for default locale / fallback locale introduces unnecessary state. 3) Having a trait in the first place requires us to copy it over to addressing once we move countries there. 4) We want to copy the repository locale approach to the NumberFormatter once we refactor it, but having extra methods there adds too much noise. 5) NumberFormatRepository has a default locale that isn't even used.
Solution: