Dependency injection anti-patterns in Drupal #drupal https://mglaman.dev/blog/dependency-injection-anti-patterns-drupal?utm_campaign=blog&utm_source=fediverse&utm_medium=social&utm_content=toot
Dependency injection anti-patterns in Drupal
Whenever I have done an audit for a Drupal codebase, one of the first things I manually review and profile is dependency injection anti-patterns in custom code and any contributed modules used. The anti-pattern isn't for accessing services statically through \Drupal: service. These anti-patterns live within the class's __construct method.