Controller\ ::__construct(), 0 passed in /var/www/html/web/core/lib/Drupal/Core/Controller/ControllerBase.php on line 109

This error occurs when trying to user services in your constructor in drupal. If you want to do something like this, you'd have to make sure your container is right. 

Check out this code, make sure you use the create() method to instantiate the container object.

https://chromatichq.com/blog/dependency-injection-drupal-8-plugins

 

 

Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!