Exceptions
Exception
Doctrine\ORM\Exception\ MissingIdentifierField
final class MissingIdentifierField extends LogicException implements ManagerException{public static function fromFieldAndClass(string $fieldName, string $className): self{return new self(sprintf('The identifier %s is missing for a query of %s',$fieldName,$className,));}
in
vendor/doctrine/orm/src/EntityManager.php
::
fromFieldAndClass
(line 307)
$sortedId = [];foreach ($class->identifier as $identifier) {if (! isset($id[$identifier])) {throw MissingIdentifierField::fromFieldAndClass($identifier, $class->name);}if ($id[$identifier] instanceof BackedEnum) {$sortedId[$identifier] = $id[$identifier]->value;} else {
in
vendor/doctrine/orm/src/EntityRepository.php
->
find
(line 86)
* @return object|null The entity instance or NULL if the entity can not be found.* @phpstan-return ?T*/public function find(mixed $id, LockMode|int|null $lockMode = null, int|null $lockVersion = null): object|null{return $this->em->find($this->entityName, $id, $lockMode, $lockVersion);}/*** Finds all entities in the repository.*
#[Route(path: '/get_subtreatments/{subDomain}', name: 'get_subtreatments')]public function getSubTreatments(Request $request): Response{$treatmentId = $request->get('treatment');$em = $this->doctrine->getManager();$treatment = $em->getRepository(TreatmentClinic::class)->find($treatmentId);$query = $query = " SELECT * FROM price_list WHERE treatment_id = $treatmentId and availability_online = 1";$subTreatments = $em->getConnection()->executeQuery($query)->fetchAllAssociative();if ($subTreatments) {$html = $this->render('sub_treatments.html.twig', ['subTreatments' => $subTreatments,
in
vendor/symfony/http-kernel/HttpKernel.php
->
getSubTreatments
(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 | Channel | Message |
|---|---|---|
| INFO 01:48:58 | deprecation |
Deprecated: App\EventListener\DoctrineExtensionSubscriber::__construct(): Optional parameter $blameableListener declared before required parameter $tokenStorage is implicitly treated as a required parameter {
"exception": {}
}
|
| INFO 01:48:58 | deprecation |
Deprecated: App\EventListener\RateLimitSubscriber::__construct(): Implicitly marking parameter $tokenStorage as nullable is deprecated, the explicit nullable type must be used instead {
"exception": {}
}
|
| INFO 01:48:58 | deprecation |
Deprecated: App\Service\RateLimiter\RateLimiterService::__construct(): Implicitly marking parameter $redis as nullable is deprecated, the explicit nullable type must be used instead {
"exception": {}
}
|
| INFO 01:48:58 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "7e871b"
},
"request_uri": "https://staging.consentz.com/_profiler/7e871b?panel=exception&type=request",
"method": "GET"
}
|
Stack Trace
|
MissingIdentifierField
|
|---|
Doctrine\ORM\Exception\MissingIdentifierField:
The identifier id is missing for a query of App\Entity\Clinic\Stock\TreatmentClinic
at vendor/doctrine/orm/src/Exception/MissingIdentifierField.php:15
at Doctrine\ORM\Exception\MissingIdentifierField::fromFieldAndClass()
(vendor/doctrine/orm/src/EntityManager.php:307)
at Doctrine\ORM\EntityManager->find()
(vendor/doctrine/orm/src/EntityRepository.php:86)
at Doctrine\ORM\EntityRepository->find()
(src/Controller/PublicProfileController.php:629)
at App\Controller\PublicProfileController->getSubTreatments()
(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('/www/wwwroot/consentz/vendor/autoload_runtime.php')
(public/index.php:4)
|