src/Configuration/NormalizerConfigPass.php
private function normalizeControllerConfig(array $backendConfig)
    {
        foreach ($backendConfig['entities'] as $entityName => $entityConfig) {
            if (isset($entityConfig['controller'])) {
                $controller = \trim($entityConfig['controller']);

                if (!$this->container->has($controller) && !\class_exists($controller)) {
                    throw new \InvalidArgumentException(\sprintf('The "%s" value defined in the "controller" option of the "%s" entity is not a valid controller. For a regular controller, set its FQCN as the value; for a controller defined as service, set its service name as the value.', $controller, $entityName));
                }

                $backendConfig['entities'][$entityName]['controller'] = $controller;
            }
        }

        return $backendConfig;
    }
private function normalizeControllerConfig(array $backendConfig)
    {
        foreach ($backendConfig['entities'] as $entityName => $entityConfig) {
            if (isset($entityConfig['controller'])) {
                $controller = \trim($entityConfig['controller']);

                if (!$this->container->has($controller) && !\class_exists($controller)) {
                    throw new \InvalidArgumentException(\sprintf('The "%s" value defined in the "controller" option of the "%s" entity is not a valid controller. For a regular controller, set its FQCN as the value; for a controller defined as service, set its service name as the value.', $controller, $entityName));
                }

                $backendConfig['entities'][$entityName]['controller'] = $controller;
            }
        }

        return $backendConfig;
    }
It processes the optional 'controller' config option to check if the
given controller exists (it doesn't matter if it's a normal controller
or if it's defined as a service).

@param array $backendConfig

@return array

@throws \InvalidArgumentException