> We can demonstrate the concept with a simple, yet naive example.
> Here we have a Database class that requires an adapter to speak to the database.
It tries so hard to be java, which seems backward.
The way PHP is evolving is definitely towards the Java world and I think it's the worst decision they could make.
Moved to Go 5 years ago, never looking back.
DI can be heavy or it can be something mostly automagical like in Laravel. That's something I've enjoyed quite a bit. Basically it doesn't that much exist until you start needing special cases.
Quite a big part of the PHP community is gravitating towards Laravel and the new steam it introduced with OOB best practices and "let's try hard to avoid the Java-heaviness". Laravel seems to have quite nice balance between easy for new devs and bunch of powerful concepts when needed. Lots of basic problems solved OOB as well.