Exceptions
Exceptions 2
Doctrine\ORM\Query\ QueryException
in
vendor/doctrine/orm/src/Query/QueryException.php
(line 28)
return new self('[Syntax Error] ' . $message, 0, $previous);}public static function semanticalError(string $message, Throwable|null $previous = null): self{return new self('[Semantical Error] ' . $message, 0, $previous);}public static function invalidLockMode(): self{return new self('Invalid lock mode hint provided.');
in
vendor/doctrine/orm/src/Query/Parser.php
::
semanticalError
(line 465)
$tokenStr = substr($dql, $token->position, $length);// Building informative message$message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;throw QueryException::semanticalError($message, QueryException::dqlError($this->query->getDQL()));}/*** Peeks beyond the matched closing parenthesis and returns the first token after that one.*
in
vendor/doctrine/orm/src/Query/Parser.php
->
semanticalError
(line 800)
if (isset($this->queryComponents[$dqlAlias]) && ! isset($this->queryComponents[$dqlAlias]['parent'])) {return;}}$this->semanticalError('Cannot select entity through identification variables without choosing at least one root entity alias.');}/*** QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement*/
in
vendor/doctrine/orm/src/Query/Parser.php
->
processRootEntityAliasSelected
(line 260)
if ($this->deferredNewObjectExpressions) {$this->processDeferredNewObjectExpressions($AST);}$this->processRootEntityAliasSelected();// TODO: Is there a way to remove this? It may impact the mixed hydration resultset a lot!$this->fixIdentificationVariableOrder($AST);return $AST;
in
vendor/doctrine/orm/src/Query/Parser.php
->
getAST
(line 330)
/*** Parses a query string.*/public function parse(): ParserResult{$AST = $this->getAST();$customWalkers = $this->query->getHint(Query::HINT_CUSTOM_TREE_WALKERS);if ($customWalkers !== false) {$this->customTreeWalkers = $customWalkers;}
in
vendor/doctrine/orm/src/Query.php
->
parse
(line 248)
}// Cache miss.$parser = new Parser($this);$this->parserResult = $parser->parse();$queryCache->save($cacheItem->set($this->parserResult)->expiresAfter($this->queryCacheTTL));return $this->parserResult;}
in
vendor/doctrine/orm/src/Query.php
->
parse
(line 717)
$this->state = self::STATE_DIRTY;}private function getSqlExecutor(): AbstractSqlExecutor{return $this->parse()->prepareSqlExecutor($this);}}
in
vendor/doctrine/orm/src/Query.php
->
getSqlExecutor
(line 257)
return $this->parserResult;}protected function _doExecute(): Result|int{$executor = $this->getSqlExecutor();if ($this->queryCacheProfile) {$executor->setQueryCacheProfile($this->queryCacheProfile);} else {$executor->removeQueryCacheProfile();
in
vendor/doctrine/orm/src/AbstractQuery.php
->
_doExecute
(line 930)
$setCacheEntry = static function ($data) use ($cache, $result, $cacheItem, $realCacheKey): void {$cache->save($cacheItem->set($result + [$realCacheKey => $data]));};}$stmt = $this->_doExecute();if (is_numeric($stmt)) {$setCacheEntry($stmt);return $stmt;
in
vendor/doctrine/orm/src/AbstractQuery.php
->
executeIgnoreQueryCache
(line 886)
): mixed {if ($this->cacheable && $this->isCacheEnabled()) {return $this->executeUsingQueryCache($parameters, $hydrationMode);}return $this->executeIgnoreQueryCache($parameters, $hydrationMode);}/*** Execute query ignoring second level cache.*
in
vendor/doctrine/orm/src/AbstractQuery.php
->
execute
(line 688)
** @phpstan-param string|AbstractQuery::HYDRATE_* $hydrationMode*/public function getResult(string|int $hydrationMode = self::HYDRATE_OBJECT): mixed{return $this->execute(null, $hydrationMode);}/*** Gets the array of results for the query.*
/*** @return list<array{person: Person, balance: float}>*/public function findPersonsWithNegativeBalance(): array{$rows = $this->getEntityManager()->createQueryBuilder()->select('p AS person')->addSelect('COALESCE(SUM(c.amount), 0) AS balance')->from(Person::class, 'p')->leftJoin(Coffee::class, 'c', 'WITH', 'c.consumer = p')
if ($user->isAdminUser()) {return $this->render('home/index.html.twig', ['is_superadmin_home' => true,'admin_stats' => $this->loadAdminDashboardStats(),'admin_negative_balances' => $this->coffeeRepository->findPersonsWithNegativeBalance(),'admin_unconfirmed_coffees' => $this->coffeeRepository->findUnconfirmedRecent(15),'admin_cashbox_balance' => $this->moneyRepository->sumAmount(),'admin_recent_money' => $this->moneyRepository->findRecent(5),]);}
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 static function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Doctrine\ORM\Query\ QueryException
in
vendor/doctrine/orm/src/Query/QueryException.php
(line 18)
class QueryException extends Exception implements ORMException{public static function dqlError(string $dql): self{return new self($dql);}public static function syntaxError(string $message, Throwable|null $previous = null): self{return new self('[Syntax Error] ' . $message, 0, $previous);
in
vendor/doctrine/orm/src/Query/Parser.php
::
dqlError
(line 465)
$tokenStr = substr($dql, $token->position, $length);// Building informative message$message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;throw QueryException::semanticalError($message, QueryException::dqlError($this->query->getDQL()));}/*** Peeks beyond the matched closing parenthesis and returns the first token after that one.*
in
vendor/doctrine/orm/src/Query/Parser.php
->
semanticalError
(line 800)
if (isset($this->queryComponents[$dqlAlias]) && ! isset($this->queryComponents[$dqlAlias]['parent'])) {return;}}$this->semanticalError('Cannot select entity through identification variables without choosing at least one root entity alias.');}/*** QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement*/
in
vendor/doctrine/orm/src/Query/Parser.php
->
processRootEntityAliasSelected
(line 260)
if ($this->deferredNewObjectExpressions) {$this->processDeferredNewObjectExpressions($AST);}$this->processRootEntityAliasSelected();// TODO: Is there a way to remove this? It may impact the mixed hydration resultset a lot!$this->fixIdentificationVariableOrder($AST);return $AST;
in
vendor/doctrine/orm/src/Query/Parser.php
->
getAST
(line 330)
/*** Parses a query string.*/public function parse(): ParserResult{$AST = $this->getAST();$customWalkers = $this->query->getHint(Query::HINT_CUSTOM_TREE_WALKERS);if ($customWalkers !== false) {$this->customTreeWalkers = $customWalkers;}
in
vendor/doctrine/orm/src/Query.php
->
parse
(line 248)
}// Cache miss.$parser = new Parser($this);$this->parserResult = $parser->parse();$queryCache->save($cacheItem->set($this->parserResult)->expiresAfter($this->queryCacheTTL));return $this->parserResult;}
in
vendor/doctrine/orm/src/Query.php
->
parse
(line 717)
$this->state = self::STATE_DIRTY;}private function getSqlExecutor(): AbstractSqlExecutor{return $this->parse()->prepareSqlExecutor($this);}}
in
vendor/doctrine/orm/src/Query.php
->
getSqlExecutor
(line 257)
return $this->parserResult;}protected function _doExecute(): Result|int{$executor = $this->getSqlExecutor();if ($this->queryCacheProfile) {$executor->setQueryCacheProfile($this->queryCacheProfile);} else {$executor->removeQueryCacheProfile();
in
vendor/doctrine/orm/src/AbstractQuery.php
->
_doExecute
(line 930)
$setCacheEntry = static function ($data) use ($cache, $result, $cacheItem, $realCacheKey): void {$cache->save($cacheItem->set($result + [$realCacheKey => $data]));};}$stmt = $this->_doExecute();if (is_numeric($stmt)) {$setCacheEntry($stmt);return $stmt;
in
vendor/doctrine/orm/src/AbstractQuery.php
->
executeIgnoreQueryCache
(line 886)
): mixed {if ($this->cacheable && $this->isCacheEnabled()) {return $this->executeUsingQueryCache($parameters, $hydrationMode);}return $this->executeIgnoreQueryCache($parameters, $hydrationMode);}/*** Execute query ignoring second level cache.*
in
vendor/doctrine/orm/src/AbstractQuery.php
->
execute
(line 688)
** @phpstan-param string|AbstractQuery::HYDRATE_* $hydrationMode*/public function getResult(string|int $hydrationMode = self::HYDRATE_OBJECT): mixed{return $this->execute(null, $hydrationMode);}/*** Gets the array of results for the query.*
/*** @return list<array{person: Person, balance: float}>*/public function findPersonsWithNegativeBalance(): array{$rows = $this->getEntityManager()->createQueryBuilder()->select('p AS person')->addSelect('COALESCE(SUM(c.amount), 0) AS balance')->from(Person::class, 'p')->leftJoin(Coffee::class, 'c', 'WITH', 'c.consumer = p')
if ($user->isAdminUser()) {return $this->render('home/index.html.twig', ['is_superadmin_home' => true,'admin_stats' => $this->loadAdminDashboardStats(),'admin_negative_balances' => $this->coffeeRepository->findPersonsWithNegativeBalance(),'admin_unconfirmed_coffees' => $this->coffeeRepository->findUnconfirmedRecent(15),'admin_cashbox_balance' => $this->moneyRepository->sumAmount(),'admin_recent_money' => $this->moneyRepository->findRecent(5),]);}
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 static function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Message |
|---|---|
| info 22:17:01 |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "ba78fb"
},
"request_uri": "https://coffee.traductera.com/_profiler/ba78fb?panel=exception&type=request",
"method": "GET"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::configure"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ValidateRequestListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener::onKernelRequest"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Bridge\Doctrine\Middleware\IdleConnection\Listener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Bridge\\Doctrine\\Middleware\\IdleConnection\\Listener::onKernelRequest"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\SessionListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\SessionListener::onKernelRequest"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::setDefaultLocale". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::setDefaultLocale"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\RouterListener::onKernelRequest"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::onKernelRequest"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleAwareListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener::onKernelRequest"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener::configureLogoutUrlGenerator". {
"event": "kernel.request",
"listener": "Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener::configureLogoutUrlGenerator"
}
|
| debug 22:17:01 |
Notified event "kernel.request" to listener "Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener::onKernelRequest". {
"event": "kernel.request",
"listener": "Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener::onKernelRequest"
}
|
| debug 22:17:01 |
Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". {
"event": "kernel.controller",
"listener": "Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector::onKernelController"
}
|
| debug 22:17:01 |
Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". {
"event": "kernel.controller",
"listener": "Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector::onKernelController"
}
|
| info 22:17:01 |
User Deprecated: Support for MySQL < 8 is deprecated and will be removed in DBAL 5 (AbstractMySQLDriver.php:75 called by AbstractDriverMiddleware.php:32, https://github.com/doctrine/dbal/pull/6343, package doctrine/dbal) {
"exception": {}
}
|
| debug 22:17:01 |
Notified event "kernel.controller_arguments" to listener "Symfony\Component\HttpKernel\EventListener\IsSignatureValidAttributeListener::onKernelControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\IsSignatureValidAttributeListener::onKernelControllerArguments"
}
|
| debug 22:17:01 |
Notified event "kernel.controller_arguments" to listener "Symfony\Component\Security\Http\EventListener\IsCsrfTokenValidAttributeListener::onKernelControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "Symfony\\Component\\Security\\Http\\EventListener\\IsCsrfTokenValidAttributeListener::onKernelControllerArguments"
}
|
| debug 22:17:01 |
Notified event "kernel.controller_arguments" to listener "Symfony\Component\Security\Http\EventListener\IsGrantedAttributeListener::onKernelControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "Symfony\\Component\\Security\\Http\\EventListener\\IsGrantedAttributeListener::onKernelControllerArguments"
}
|
| debug 22:17:01 |
Notified event "kernel.controller_arguments" to listener "Symfony\Component\HttpKernel\EventListener\CacheAttributeListener::onKernelControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\CacheAttributeListener::onKernelControllerArguments"
}
|
| debug 22:17:01 |
Notified event "kernel.controller_arguments" to listener "Symfony\Component\HttpKernel\EventListener\ErrorListener::onControllerArguments". {
"event": "kernel.controller_arguments",
"listener": "Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener::onControllerArguments"
}
|
Stack Traces 2
|
[2/2]
QueryException
|
|---|
Doctrine\ORM\Query\QueryException:
[Semantical Error] line 0, col -1 near 'SELECT cons AS': Error: Cannot select entity through identification variables without choosing at least one root entity alias.
at vendor/doctrine/orm/src/Query/QueryException.php:28
at Doctrine\ORM\Query\QueryException::semanticalError()
(vendor/doctrine/orm/src/Query/Parser.php:465)
at Doctrine\ORM\Query\Parser->semanticalError()
(vendor/doctrine/orm/src/Query/Parser.php:800)
at Doctrine\ORM\Query\Parser->processRootEntityAliasSelected()
(vendor/doctrine/orm/src/Query/Parser.php:260)
at Doctrine\ORM\Query\Parser->getAST()
(vendor/doctrine/orm/src/Query/Parser.php:330)
at Doctrine\ORM\Query\Parser->parse()
(vendor/doctrine/orm/src/Query.php:248)
at Doctrine\ORM\Query->parse()
(vendor/doctrine/orm/src/Query.php:717)
at Doctrine\ORM\Query->getSqlExecutor()
(vendor/doctrine/orm/src/Query.php:257)
at Doctrine\ORM\Query->_doExecute()
(vendor/doctrine/orm/src/AbstractQuery.php:930)
at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache()
(vendor/doctrine/orm/src/AbstractQuery.php:886)
at Doctrine\ORM\AbstractQuery->execute()
(vendor/doctrine/orm/src/AbstractQuery.php:688)
at Doctrine\ORM\AbstractQuery->getResult()
(src/Repository/CoffeeRepository.php:191)
at App\Repository\CoffeeRepository->findPersonsWithNegativeBalance()
(src/Controller/HomeController.php:68)
at App\Controller\HomeController->index()
(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()
(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/coffee/vendor/autoload_runtime.php')
(public/index.php:5)
|
|
[1/2]
QueryException
|
|---|
Doctrine\ORM\Query\QueryException:
SELECT cons AS person, COALESCE(SUM(c.amount), 0) AS balance FROM App\Entity\Coffee c LEFT JOIN c.consumer cons WHERE c.consumer IS NOT NULL GROUP BY cons.id HAVING COALESCE(SUM(c.amount), 0) < 0 ORDER BY balance ASC, cons.name ASC, cons.id ASC
at vendor/doctrine/orm/src/Query/QueryException.php:18
at Doctrine\ORM\Query\QueryException::dqlError()
(vendor/doctrine/orm/src/Query/Parser.php:465)
at Doctrine\ORM\Query\Parser->semanticalError()
(vendor/doctrine/orm/src/Query/Parser.php:800)
at Doctrine\ORM\Query\Parser->processRootEntityAliasSelected()
(vendor/doctrine/orm/src/Query/Parser.php:260)
at Doctrine\ORM\Query\Parser->getAST()
(vendor/doctrine/orm/src/Query/Parser.php:330)
at Doctrine\ORM\Query\Parser->parse()
(vendor/doctrine/orm/src/Query.php:248)
at Doctrine\ORM\Query->parse()
(vendor/doctrine/orm/src/Query.php:717)
at Doctrine\ORM\Query->getSqlExecutor()
(vendor/doctrine/orm/src/Query.php:257)
at Doctrine\ORM\Query->_doExecute()
(vendor/doctrine/orm/src/AbstractQuery.php:930)
at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache()
(vendor/doctrine/orm/src/AbstractQuery.php:886)
at Doctrine\ORM\AbstractQuery->execute()
(vendor/doctrine/orm/src/AbstractQuery.php:688)
at Doctrine\ORM\AbstractQuery->getResult()
(src/Repository/CoffeeRepository.php:191)
at App\Repository\CoffeeRepository->findPersonsWithNegativeBalance()
(src/Controller/HomeController.php:68)
at App\Controller\HomeController->index()
(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()
(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/coffee/vendor/autoload_runtime.php')
(public/index.php:5)
|