How to use service container correcly?
The error:


  Method call uses 2 parameters, but method signature uses 1


Your create() method is defined to only receive a single argument, $container. This must be a debugger in PHPStorm giving you this output, because what it is saying is that the code calling SomeController::create() is passing two arguments. So the second is getting lost. Your problem is likely stemming from that, and probably means one of two things:


The code calling the create() function is mistakenly passing a second value, or
Your create() function needs to be re-defined to catch the second argument, and do something with it.


ControllerBase::create only expects a single argument, $container, and since your function defines that, I'd guess the more likely culprit is the calling function passing an unnecessary argument (#1 above). However, if the passed variable is necessary for some reason, SomeController::create() can be redefined to catch an optional argument:

public function create(ContainerInteface $container, $additional_param1 = NULL) {
  if (is_null($additional_param1)) {
    throw new \Exception('$additional_param_1 is required');
  }

  // Continue as normal.

}