Error 500 Internal Server Error

GET https://www.le-vent-du-changement.fr/sitemap.xml

Exceptions

Service "arte_sitemap" not found: even though it exists in the app's container, the container inside "AppBundle\Controller\sitemapController" is a smaller service locator that only knows about the "router", "request_stack", "http_kernel", "security.authorization_checker", "twig", "form.factory", "security.token_storage", "security.csrf.token_manager", "parameter_bag", "ar_admin.configuration", "ar_admin.client", "ar_admin.mailadmin", "ar_products.getElems", "ar_products.search", "ar_multiquiz.getElems", "ar_multiquiz.importExport", "ar_multiquiz.calculateTreatments", "jms_serializer", "security.password_hasher", "doctrine", "mailer" and "translator" services. Try using dependency injection instead.

Exception

Symfony\Component\DependencyInjection\Exception\ ServiceNotFoundException

Show exception properties
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException {#470
  -id: "arte_sitemap"
  -sourceId: null
  -alternatives: []
}
  1. $msg[] = \sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class));
  2. } else {
  3. $msg[] = 'Try using dependency injection instead.';
  4. }
  5. return new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], implode(' ', $msg));
  6. }
  7. private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface
  8. {
  9. return new ServiceCircularReferenceException($id, $path);
in vendor/symfony/service-contracts/ServiceLocatorTrait.php -> createNotFoundException (line 48)
  1. }
  2. public function get(string $id): mixed
  3. {
  4. if (!isset($this->factories[$id])) {
  5. throw $this->createNotFoundException($id);
  6. }
  7. if (isset($this->loading[$id])) {
  8. $ids = array_values($this->loading);
  9. $ids = \array_slice($this->loading, array_search($id, $ids));
  1. if (!$this->externalId) {
  2. return $this->doGet($id);
  3. }
  4. try {
  5. return $this->doGet($id);
  6. } catch (RuntimeException $e) {
  7. $what = \sprintf('service "%s" required by "%s"', $id, $this->externalId);
  8. $message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $e->getMessage());
  9. if ($e->getMessage() === $message) {
  1. }
  2. public function get(string $id): mixed
  3. {
  4. return match (\count($this->serviceMap[$id] ?? [])) {
  5. 0 => parent::get($id),
  6. 1 => $this->serviceMap[$id][0],
  7. default => ($this->factory)(...$this->serviceMap[$id]),
  8. };
  9. }
ServiceLocator->get() in src/AppBundle/Controller/BaseController.php (line 26)
  1. abstract class BaseController extends AbstractController
  2. {
  3. protected function get(string $id): object
  4. {
  5. return $this->container->get($id);
  6. }
  7. protected function getDoctrine(): ManagerRegistry
  8. {
  9. return $this->container->get('doctrine');
BaseController->get() in src/AppBundle/Controller/sitemapController.php (line 20)
  1. #[Route("/sitemap.{_format}", name: "sitemappage", defaults: ["_format" => "xml"])]
  2. public function indexAction()
  3. {
  4. return $this->render(
  5. 'sitemap/sitemap.xml.twig',
  6. ['urls' => $this->get('arte_sitemap')->generate()]
  7. );
  8. }
  9. }
in vendor/symfony/http-kernel/HttpKernel.php -> indexAction (line 183)
  1. $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
  2. $controller = $event->getController();
  3. $arguments = $event->getArguments();
  4. // call controller
  5. $response = $controller(...$arguments);
  6. // view
  7. if (!$response instanceof Response) {
  8. $event = new ViewEvent($this, $request, $type, $response, $event);
  9. $this->dispatcher->dispatch($event, KernelEvents::VIEW);
  1. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2. $this->requestStack->push($request);
  3. $response = null;
  4. try {
  5. return $response = $this->handleRaw($request, $type);
  6. } catch (\Throwable $e) {
  7. if ($e instanceof \Error && !$this->handleAllThrowables) {
  8. throw $e;
  9. }
  1. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
Kernel->handle() in public/index.php (line 10)
  1. require __DIR__.'/../vendor/autoload.php';
  2. $kernel = new Kernel('dev', true);
  3. $request = Request::createFromGlobals();
  4. $response = $kernel->handle($request);
  5. $response->send();
  6. $kernel->terminate($request, $response);

Logs

Level Channel Message
INFO 23:49:42 php User Deprecated: Class "Doctrine\ORM\Proxy\Autoloader" is deprecated. Use native lazy objects instead. (Autoloader.php:74 called by DoctrineBundle.php:136, https://github.com/doctrine/orm/pull/12005, package doctrine/orm)
{
    "exception": {}
}
INFO 23:49:42 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "3f9c00"
    },
    "request_uri": "https://www.le-vent-du-changement.fr/_profiler/3f9c00",
    "method": "GET"
}

Stack Trace

ServiceNotFoundException
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:
Service "arte_sitemap" not found: even though it exists in the app's container, the container inside "AppBundle\Controller\sitemapController" is a smaller service locator that only knows about the "router", "request_stack", "http_kernel", "security.authorization_checker", "twig", "form.factory", "security.token_storage", "security.csrf.token_manager", "parameter_bag", "ar_admin.configuration", "ar_admin.client", "ar_admin.mailadmin", "ar_products.getElems", "ar_products.search", "ar_multiquiz.getElems", "ar_multiquiz.importExport", "ar_multiquiz.calculateTreatments", "jms_serializer", "security.password_hasher", "doctrine", "mailer" and "translator" services. Try using dependency injection instead.

  at vendor/symfony/dependency-injection/ServiceLocator.php:137
  at Symfony\Component\DependencyInjection\ServiceLocator->createNotFoundException()
     (vendor/symfony/service-contracts/ServiceLocatorTrait.php:48)
  at Symfony\Component\DependencyInjection\ServiceLocator->doGet()
     (vendor/symfony/dependency-injection/ServiceLocator.php:47)
  at Symfony\Component\DependencyInjection\ServiceLocator->get()
     (vendor/symfony/dependency-injection/Argument/ServiceLocator.php:34)
  at Symfony\Component\DependencyInjection\Argument\ServiceLocator->get()
     (src/AppBundle/Controller/BaseController.php:26)
  at AppBundle\Controller\BaseController->get()
     (src/AppBundle/Controller/sitemapController.php:20)
  at AppBundle\Controller\sitemapController->indexAction()
     (vendor/symfony/http-kernel/HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:193)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:10)