lag the Java community by a few years, so now as autowiring is becoming hot in PHP, the Java community has been burned by the resulting dependency spaghetti are calling it an anti-pattern.
It's a very tiresome cycle: "best silver bullet ever!" and then "worst anti-pattern ever!".
I'm not saying "do not use autowiring at all" (although I do not), but stay conservative and never ever allow your code to be dictated by the autowiring features. Never change how you design an object because of autowiring. And I'm afraid this is easier said.
там где автовайринг не подходит, есть php dsl с 3.4 версии
Обсуждают сегодня