Dependency injection and the principle of least privilege

Don’t know if self-promotion is allowed here, but anyway, I wrote a short article about DI and ownership, using Yii 2 database connection as example. Feel free to comment. :slight_smile:

http://olleharstedt.github.io/php/2020/07/08/immutable-at-borrow.html