robertduplock
10/16/2018 - 12:08 AM

Too few arguments error on constructor in Drupal 8

Check the my_module.services.yml file:

services:
  my_module.my_helper:
    class: Drupal\my_module\MyHelper
    // Ensure correct number of arguments below!!!
    arguments: ['@entity_type.manager', '@current_route_match', '@request_stack']