Exceptions
Exception
Symfony\Component\DependencyInjection\Exception\ ServiceNotFoundException
Show exception properties
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException {#470 -id: "arte_sitemap" -sourceId: null -alternatives: [] }
in
vendor/symfony/dependency-injection/ServiceLocator.php
(line 137)
$msg[] = \sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class));} else {$msg[] = 'Try using dependency injection instead.';}return new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], implode(' ', $msg));}private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface{return new ServiceCircularReferenceException($id, $path);
in
vendor/symfony/service-contracts/ServiceLocatorTrait.php
->
createNotFoundException
(line 48)
}public function get(string $id): mixed{if (!isset($this->factories[$id])) {throw $this->createNotFoundException($id);}if (isset($this->loading[$id])) {$ids = array_values($this->loading);$ids = \array_slice($this->loading, array_search($id, $ids));
in
vendor/symfony/dependency-injection/ServiceLocator.php
->
doGet
(line 47)
if (!$this->externalId) {return $this->doGet($id);}try {return $this->doGet($id);} catch (RuntimeException $e) {$what = \sprintf('service "%s" required by "%s"', $id, $this->externalId);$message = preg_replace('/service "\.service_locator\.[^"]++"/', $what, $e->getMessage());if ($e->getMessage() === $message) {
in
vendor/symfony/dependency-injection/Argument/ServiceLocator.php
->
get
(line 34)
}public function get(string $id): mixed{return match (\count($this->serviceMap[$id] ?? [])) {0 => parent::get($id),1 => $this->serviceMap[$id][0],default => ($this->factory)(...$this->serviceMap[$id]),};}
abstract class BaseController extends AbstractController{protected function get(string $id): object{return $this->container->get($id);}protected function getDoctrine(): ManagerRegistry{return $this->container->get('doctrine');
#[Route("/sitemap.{_format}", name: "sitemappage", defaults: ["_format" => "xml"])]public function indexAction(){return $this->render('sitemap/sitemap.xml.twig',['urls' => $this->get('arte_sitemap')->generate()]);}}
in
vendor/symfony/http-kernel/HttpKernel.php
->
indexAction
(line 183)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 193)
if (!$this->handlingHttpCache) {$this->resetServices = true;}try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
require __DIR__.'/../vendor/autoload.php';$kernel = new Kernel('dev', true);$request = Request::createFromGlobals();$response = $kernel->handle($request);$response->send();$kernel->terminate($request, $response);
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 22:29:50 | 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 22:29:50 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "latest"
},
"request_uri": "https://www.le-vent-du-changement.fr/_profiler/latest?ip=216.73.217.42&type=request",
"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)
|