I am trying to create a custom service and call it from a controller that is being used on a route. I use simple code, so I think I am missing something
The membership service: https://gist.github.com/betz/6e0cb7ce2712793711d4c9ed99a3a697
Controller: https://gist.github.com/betz/a9aa9db636cd9b9bffea3b4e255fb1df
services file: https://gist.github.com/betz/25aeb579c265bfba83a0e891aa883bf8
routing file: https://gist.github.com/betz/577a411a8ede77ecc0be614044ec1a44
The error I get:
RuntimeException: Controller "Drupal\hsbxl_members\Controller\Test::test()" requires that you provide a value for the "$container" argument (because there is no default value or because there is a non optional argument after this one). in Drupal\Core\Controller\ControllerResolver->doGetArguments() (line 165 of /var/www/drupalvm/web/core/lib/Drupal/Core/Controller/ControllerResolver.php).
So it seems the ContainerInterface $container is missing when the controller is being initiated. But how do i do this? Confused.
Cheers! Tom