Exceptions
Exception
BadMethodCallException
in
vendor/doctrine/orm/src/EntityRepository.php
(line 165)
if (str_starts_with($method, 'countBy')) {return $this->resolveMagicCall('count', substr($method, 7), $arguments);}throw new BadMethodCallException(sprintf('Undefined method "%s". The method name must start with ' .'either findBy, findOneBy or countBy!',$method,));}
in
vendor/doctrine/doctrine-bundle/src/Repository/ServiceEntityRepositoryProxy.php
->
__call
(line 95)
/*** {@inheritDoc}*/public function __call(string $method, array $arguments): mixed{return ($this->repository ??= $this->resolveRepository())->$method(...$arguments);}protected function getEntityName(): string{return ($this->repository ??= $this->resolveRepository())->getEntityName();
ServiceEntityRepositoryProxy->__call('findAllAvailable', array())
in
src/Controller/ShopController.php
(line 18)
#[Route('/shop', name: 'app_shop')]public function index(ProductRepository $productRepository,CategoryRepository $categoryRepository): Response {$products = $productRepository->findAllAvailable();$categories = $categoryRepository->findAllRootCategories();return $this->render('shop/index.html.twig', ['products' => $products,'categories' => $categories,
in
vendor/symfony/http-kernel/HttpKernel.php
->
index
(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;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in
vendor/autoload_runtime.php
->
run
(line 32)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 15:47:20 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "dd5075"
},
"request_uri": "https://e-commerce.it.com/_profiler/dd5075?panel=exception&type=request",
"method": "GET"
}
|
Stack Trace
|
BadMethodCallException
|
|---|
BadMethodCallException:
Undefined method "findAllAvailable". The method name must start with either findBy, findOneBy or countBy!
at vendor/doctrine/orm/src/EntityRepository.php:165
at Doctrine\ORM\EntityRepository->__call('findAllAvailable', array())
(vendor/doctrine/doctrine-bundle/src/Repository/ServiceEntityRepositoryProxy.php:95)
at Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepositoryProxy->__call('findAllAvailable', array())
(src/Controller/ShopController.php:18)
at App\Controller\ShopController->index(object(ProductRepository), object(CategoryRepository))
(vendor/symfony/http-kernel/HttpKernel.php:183)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:193)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/var/www/html/vendor/autoload_runtime.php')
(public/index.php:5)
|