code: protected function mapRequestToArguments(\ReflectionMethod $method, Request $request)
      {
          $map = [];
          foreach ($method->getParameters() as $parameter) {
              $value = $request->getParameter(
                  $parameter->getName(),
                  $parameter->isDefaultValueAvailable() ? $parameter->getDefaultValue() : null
              );
              if ($parameter->getClass() &&
                  $parameter->getClass()->implementsInterface(Deserializable::class)
              ) {
                  /** @var Deserializable $deserializable */
                  $value = $parameter->getClass()
                      ->newInstanceWithoutConstructor()
                      ->ayeAyeDeserialize($value);
                  $className = $parameter->getClass()->getName();
                  if (!is_object($value) || get_class($value) !== $className) {
                      throw new \RuntimeException("$className::ayeAyeDeserialize did not return an instance of itself");
                  }
              }
              $map[$parameter->getName()] = $value;
          }
          return $map;
      }
docs: Creates an array of parameters with which to call a method.
  
  Matches the parameters in a given method to the values available in the
  given request. For absent values, either the default, or null, will be
  used.
  
  @param \ReflectionMethod $method
  @param Request $request
  @return array