code: public function apply(Request $request, ParamConverter $configuration)
      {
          $object = $this->callService($request, $configuration);
  
          $class = $configuration->getClass();
          if ($object instanceof $class) {
              $request->attributes->set($configuration->getName(), $object);
  
              return true;
          }
  
          if ($configuration->isOptional()) {
              return false;
          }
  
          throw new NotFoundHttpException(sprintf('Object of class "%s" not found.', $class));
      }
docs: @param Request        $request
  @param ParamConverter $configuration
  
  @return bool