Figuring out autowired Dependency Injection of custom services with OOP hooks
I was switching over from using procedural hooks to object-oriented programming (OOP) hooks today. I ran into an error that was confusing to me because I had already defined services:
Cannot autowire service “Drupal\nokoto_social\Hook\ActorHooks”: argument “$activityManager” of method “__construct()” references class “Drupal\nokoto_social\ActivityManager��� but no such service exists. You should maybe alias this class to the existing “nokoto_social.activity_manager” service.