Extract database gateways
What does this MR do?
Defines a new pattern for database access:
- uses PDO (instead of mysqli)
- uses composition-over-inheritance to only include relevent methods in each gateway
- introduces dependency injection (so you can easily define which resources you need in a given controller, for example)
- remove global PDO
- configure DI PDO from config.inc.*.php variables
- get DI PDO to work with the wrapped DebugBar PDO thing
- remove duplication of DI configuration between container test helper and setup.php
- check it a bit more....
How confident are you it won't break things if deployed?
Needs more checking...
Links to related issues
- 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))