Error 500 Internal Server Error

GET http://admin-symfony-review.kube-dev.ugol.click/estimate-material/batch-delete

Forwarded to ErrorController (b4d3c3)

Exceptions

An exception occurred while executing a query: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "batch-delete"
CONTEXT: unnamed portal parameter $1 = '...'

Exceptions 3

Doctrine\DBAL\Exception\ DriverException

Show exception properties
Doctrine\DBAL\Exception\DriverException {#995
  -query: Doctrine\DBAL\Query {#993
    -sql: "SELECT t0.estimate_material_id AS estimate_material_id_1, t0.created_at AS created_at_2, t0.deleted_at AS deleted_at_3, t0.key AS key_4, t0.quantity_real AS quantity_real_5, t0.quantity AS quantity_6, t0.price AS price_7, t0.amount AS amount_8, t0.estimate_work_id AS estimate_work_id_9, t0.material_id AS material_id_10 FROM estimate_estimates_materials t0 WHERE t0.estimate_material_id = ?"
    -params: array:1 [
      0 => "batch-delete"
    ]
    -types: array:1 [
      0 => "integer"
    ]
  }
}
  1. // We have to match against the SQLSTATE in the error message in these cases.
  2. if ($exception->getCode() === 7 && strpos($exception->getMessage(), 'SQLSTATE[08006]') !== false) {
  3. return new ConnectionException($exception, $query);
  4. }
  5. return new DriverException($exception, $query);
  6. }
  7. }
  1. private function handleDriverException(
  2. Driver\Exception $driverException,
  3. ?Query $query
  4. ): DriverException {
  5. $this->exceptionConverter ??= $this->_driver->getExceptionConverter();
  6. $exception = $this->exceptionConverter->convert($driverException, $query);
  7. if ($exception instanceof ConnectionLost) {
  8. $this->close();
  9. }
in vendor/doctrine/dbal/src/Connection.php -> handleDriverException (line 1918)
  1. Driver\Exception $e,
  2. string $sql,
  3. array $params = [],
  4. array $types = []
  5. ): DriverException {
  6. return $this->handleDriverException($e, new Query($sql, $params, $types));
  7. }
  8. /** @internal */
  9. final public function convertException(Driver\Exception $e): DriverException
  10. {
in vendor/doctrine/dbal/src/Connection.php -> convertExceptionDuringQuery (line 1111)
  1. $result = $connection->query($sql);
  2. }
  3. return new Result($result, $this);
  4. } catch (Driver\Exception $e) {
  5. throw $this->convertExceptionDuringQuery($e, $sql, $params, $types);
  6. } finally {
  7. if ($logger !== null) {
  8. $logger->stopQuery();
  9. }
  10. }
  1. ): object|null {
  2. $this->switchPersisterContext(null, $limit);
  3. $sql = $this->getSelectSQL($criteria, $assoc, $lockMode, $limit, null, $orderBy);
  4. [$params, $types] = $this->expandParameters($criteria);
  5. $stmt = $this->conn->executeQuery($sql, $params, $types);
  6. if ($entity !== null) {
  7. $hints[Query::HINT_REFRESH] = true;
  8. $hints[Query::HINT_REFRESH_ENTITY] = $entity;
  9. }
  1. /**
  2. * {@inheritDoc}
  3. */
  4. public function loadById(array $identifier, object|null $entity = null): object|null
  5. {
  6. return $this->load($identifier, $entity);
  7. }
  8. /**
  9. * {@inheritDoc}
  10. */
  1. case $lockMode === LockMode::PESSIMISTIC_READ:
  2. case $lockMode === LockMode::PESSIMISTIC_WRITE:
  3. return $persister->load($sortedId, null, null, [], $lockMode);
  4. default:
  5. return $persister->loadById($sortedId);
  6. }
  7. }
  8. public function getReference(string $entityName, mixed $id): object|null
  9. {
  1. * @return object|null The entity instance or NULL if the entity can not be found.
  2. * @phpstan-return ?T
  3. */
  4. public function find(mixed $id, LockMode|int|null $lockMode = null, int|null $lockVersion = null): object|null
  5. {
  6. return $this->em->find($this->entityName, $id, $lockMode, $lockVersion);
  7. }
  8. /**
  9. * Finds all entities in the repository.
  10. *
  1. * @param class-string $entityFqcn
  2. */
  3. private function getEntityInstance(string $entityFqcn, mixed $entityIdValue): object
  4. {
  5. $entityManager = $this->getEntityManager($entityFqcn);
  6. if (null === $entityInstance = $entityManager->getRepository($entityFqcn)->find($entityIdValue)) {
  7. $entityIdName = $entityManager->getClassMetadata($entityFqcn)->getIdentifierFieldNames()[0];
  8. throw new EntityNotFoundException(['entity_name' => $entityFqcn, 'entity_id_name' => $entityIdName, 'entity_id_value' => $entityIdValue]);
  9. }
  1. * @param class-string|null $entityFqcn
  2. */
  3. private function doCreate(?string $entityFqcn = null, mixed $entityId = null, string|Expression|null $entityPermission = null, ?object $entityInstance = null): EntityDto
  4. {
  5. if (null === $entityInstance && null !== $entityFqcn) {
  6. $entityInstance = null === $entityId ? null : $this->getEntityInstance($entityFqcn, $entityId);
  7. }
  8. if (null !== $entityInstance && null === $entityFqcn) {
  9. if ($entityInstance instanceof Proxy) {
  10. $entityInstance->__load();
  1. /**
  2. * @param class-string $entityFqcn
  3. */
  4. public function create(string $entityFqcn, mixed $entityId = null, string|Expression|null $entityPermission = null): EntityDto
  5. {
  6. return $this->doCreate($entityFqcn, $entityId, $entityPermission);
  7. }
  8. /**
  9. * @param object $entityInstance
  10. */
  1. // when using pretty URLs, the entity ID is passed as a request attribute (it's part of the route path);
  2. // in legacy URLs, the entity ID is passed as a regular query parameter
  3. $entityId = $request->attributes->get(EA::ENTITY_ID) ?? $request->query->get(EA::ENTITY_ID);
  4. return $this->entityFactory->create($crudDto->getEntityFqcn(), $entityId, $crudDto->getEntityPermission());
  5. }
  6. }
  1. $user = $this->getUser($this->tokenStorage);
  2. // build a first version of CrudDto without actions so we can create AdminContext, which is
  3. // needed for action extensions; later, we'll update the CrudDto object with the full action config
  4. $crudDto = $this->getCrudDto($this->adminControllers, $dashboardController, $crudController, new ActionConfigDto(), $filters, $crudAction, $pageName);
  5. $entityDto = $this->getEntityDto($request, $crudDto);
  6. $searchDto = $this->getSearchDto($request, $crudDto);
  7. $i18nDto = $this->getI18nDto($request, $dashboardDto, $crudDto, $entityDto);
  8. $templateRegistry = $this->getTemplateRegistry($dashboardController, $crudDto);
  9. $usePrettyUrls = $this->adminRouteGenerator->usesPrettyUrls();
  1. $actionName = $request->attributes->get(EA::CRUD_ACTION);
  2. $crudControllerInstance = $this->controllerFactory->getCrudControllerInstance($crudControllerFqcn, $actionName, $request);
  3. try {
  4. $adminContext = $this->adminContextFactory->create($request, $dashboardControllerInstance, $crudControllerInstance, $actionName);
  5. } catch (BaseException $e) {
  6. // if context creation fails (e.g. entity not found), create a context
  7. // without the entity so the ExceptionListener can still render the
  8. // EasyAdmin error page with the proper layout
  9. $entityId = $request->attributes->get(EA::ENTITY_ID) ?? $request->query->get(EA::ENTITY_ID);
in vendor/symfony/event-dispatcher/Debug/WrappedListener.php -> onKernelRequestPrettyUrls (line 115)
  1. $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);
  2. $e = $this->stopwatch->start($this->name, 'event_listener');
  3. try {
  4. ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
  5. } finally {
  6. if ($e->isStarted()) {
  7. $e->stop();
  8. }
  9. }
  1. foreach ($listeners as $listener) {
  2. if ($stoppable && $event->isPropagationStopped()) {
  3. break;
  4. }
  5. $listener($event, $eventName, $this);
  6. }
  7. }
  8. /**
  9. * Sorts the internal list of listeners for the given event by priority.
  1. } else {
  2. $listeners = $this->getListeners($eventName);
  3. }
  4. if ($listeners) {
  5. $this->callListeners($listeners, $eventName, $event);
  6. }
  7. return $event;
  8. }
  1. try {
  2. $this->beforeDispatch($eventName, $event);
  3. try {
  4. $e = $this->stopwatch->start($eventName, 'section');
  5. try {
  6. $this->dispatcher->dispatch($event, $eventName);
  7. } finally {
  8. if ($e->isStarted()) {
  9. $e->stop();
  10. }
  11. }
  1. */
  2. private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response
  3. {
  4. // request
  5. $event = new RequestEvent($this, $request, $type);
  6. $this->dispatcher->dispatch($event, KernelEvents::REQUEST);
  7. if ($event->hasResponse()) {
  8. return $this->filterResponse($event->getResponse(), $request, $type);
  9. }
  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. $this->boot();
  2. ++$this->requestStackSize;
  3. $this->resetServices = true;
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. if (Kernel::VERSION_ID >= 60400) {
  7. $response->send(false);
  8. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 29)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/app/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use Shared\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. $APP_ENV = $context['APP_ENV'];
  6. $APP_DEBUG = $context['APP_DEBUG'];
  7. $APP_ID = $context['APP_ID'];

Doctrine\DBAL\Driver\PDO\ Exception

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "batch-delete" CONTEXT: unnamed portal parameter $1 = '...'

  1. } else {
  2. $code = $exception->getCode();
  3. $sqlState = null;
  4. }
  5. return new self($exception->getMessage(), $sqlState, $code, $exception);
  6. }
  7. }
  1. }
  2. try {
  3. $this->stmt->execute($params);
  4. } catch (PDOException $exception) {
  5. throw Exception::new($exception);
  6. }
  7. return new Result($this->stmt);
  8. }
  9. }
  1. /**
  2. * {@inheritDoc}
  3. */
  4. public function execute($params = null): Result
  5. {
  6. return $this->wrappedStatement->execute($params);
  7. }
  8. }
  1. 'sql' => $this->sql,
  2. 'params' => $params ?? $this->params,
  3. 'types' => $this->types,
  4. ]);
  5. return parent::execute($params);
  6. }
  7. }
  1. /**
  2. * {@inheritDoc}
  3. */
  4. public function execute($params = null): Result
  5. {
  6. return $this->wrappedStatement->execute($params);
  7. }
  8. }
  1. $this->stopwatch?->start('doctrine', 'doctrine');
  2. $query->start();
  3. try {
  4. return parent::execute($params);
  5. } finally {
  6. $query->stop();
  7. $this->stopwatch?->stop('doctrine');
  8. }
  9. }
  1. $stmt = $connection->prepare($sql);
  2. $this->bindParameters($stmt, $params, $types);
  3. $result = $stmt->execute();
  4. } else {
  5. $result = $connection->query($sql);
  6. }
  7. return new Result($result, $this);
  1. ): object|null {
  2. $this->switchPersisterContext(null, $limit);
  3. $sql = $this->getSelectSQL($criteria, $assoc, $lockMode, $limit, null, $orderBy);
  4. [$params, $types] = $this->expandParameters($criteria);
  5. $stmt = $this->conn->executeQuery($sql, $params, $types);
  6. if ($entity !== null) {
  7. $hints[Query::HINT_REFRESH] = true;
  8. $hints[Query::HINT_REFRESH_ENTITY] = $entity;
  9. }
  1. /**
  2. * {@inheritDoc}
  3. */
  4. public function loadById(array $identifier, object|null $entity = null): object|null
  5. {
  6. return $this->load($identifier, $entity);
  7. }
  8. /**
  9. * {@inheritDoc}
  10. */
  1. case $lockMode === LockMode::PESSIMISTIC_READ:
  2. case $lockMode === LockMode::PESSIMISTIC_WRITE:
  3. return $persister->load($sortedId, null, null, [], $lockMode);
  4. default:
  5. return $persister->loadById($sortedId);
  6. }
  7. }
  8. public function getReference(string $entityName, mixed $id): object|null
  9. {
  1. * @return object|null The entity instance or NULL if the entity can not be found.
  2. * @phpstan-return ?T
  3. */
  4. public function find(mixed $id, LockMode|int|null $lockMode = null, int|null $lockVersion = null): object|null
  5. {
  6. return $this->em->find($this->entityName, $id, $lockMode, $lockVersion);
  7. }
  8. /**
  9. * Finds all entities in the repository.
  10. *
  1. * @param class-string $entityFqcn
  2. */
  3. private function getEntityInstance(string $entityFqcn, mixed $entityIdValue): object
  4. {
  5. $entityManager = $this->getEntityManager($entityFqcn);
  6. if (null === $entityInstance = $entityManager->getRepository($entityFqcn)->find($entityIdValue)) {
  7. $entityIdName = $entityManager->getClassMetadata($entityFqcn)->getIdentifierFieldNames()[0];
  8. throw new EntityNotFoundException(['entity_name' => $entityFqcn, 'entity_id_name' => $entityIdName, 'entity_id_value' => $entityIdValue]);
  9. }
  1. * @param class-string|null $entityFqcn
  2. */
  3. private function doCreate(?string $entityFqcn = null, mixed $entityId = null, string|Expression|null $entityPermission = null, ?object $entityInstance = null): EntityDto
  4. {
  5. if (null === $entityInstance && null !== $entityFqcn) {
  6. $entityInstance = null === $entityId ? null : $this->getEntityInstance($entityFqcn, $entityId);
  7. }
  8. if (null !== $entityInstance && null === $entityFqcn) {
  9. if ($entityInstance instanceof Proxy) {
  10. $entityInstance->__load();
  1. /**
  2. * @param class-string $entityFqcn
  3. */
  4. public function create(string $entityFqcn, mixed $entityId = null, string|Expression|null $entityPermission = null): EntityDto
  5. {
  6. return $this->doCreate($entityFqcn, $entityId, $entityPermission);
  7. }
  8. /**
  9. * @param object $entityInstance
  10. */
  1. // when using pretty URLs, the entity ID is passed as a request attribute (it's part of the route path);
  2. // in legacy URLs, the entity ID is passed as a regular query parameter
  3. $entityId = $request->attributes->get(EA::ENTITY_ID) ?? $request->query->get(EA::ENTITY_ID);
  4. return $this->entityFactory->create($crudDto->getEntityFqcn(), $entityId, $crudDto->getEntityPermission());
  5. }
  6. }
  1. $user = $this->getUser($this->tokenStorage);
  2. // build a first version of CrudDto without actions so we can create AdminContext, which is
  3. // needed for action extensions; later, we'll update the CrudDto object with the full action config
  4. $crudDto = $this->getCrudDto($this->adminControllers, $dashboardController, $crudController, new ActionConfigDto(), $filters, $crudAction, $pageName);
  5. $entityDto = $this->getEntityDto($request, $crudDto);
  6. $searchDto = $this->getSearchDto($request, $crudDto);
  7. $i18nDto = $this->getI18nDto($request, $dashboardDto, $crudDto, $entityDto);
  8. $templateRegistry = $this->getTemplateRegistry($dashboardController, $crudDto);
  9. $usePrettyUrls = $this->adminRouteGenerator->usesPrettyUrls();
  1. $actionName = $request->attributes->get(EA::CRUD_ACTION);
  2. $crudControllerInstance = $this->controllerFactory->getCrudControllerInstance($crudControllerFqcn, $actionName, $request);
  3. try {
  4. $adminContext = $this->adminContextFactory->create($request, $dashboardControllerInstance, $crudControllerInstance, $actionName);
  5. } catch (BaseException $e) {
  6. // if context creation fails (e.g. entity not found), create a context
  7. // without the entity so the ExceptionListener can still render the
  8. // EasyAdmin error page with the proper layout
  9. $entityId = $request->attributes->get(EA::ENTITY_ID) ?? $request->query->get(EA::ENTITY_ID);
in vendor/symfony/event-dispatcher/Debug/WrappedListener.php -> onKernelRequestPrettyUrls (line 115)
  1. $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);
  2. $e = $this->stopwatch->start($this->name, 'event_listener');
  3. try {
  4. ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
  5. } finally {
  6. if ($e->isStarted()) {
  7. $e->stop();
  8. }
  9. }
  1. foreach ($listeners as $listener) {
  2. if ($stoppable && $event->isPropagationStopped()) {
  3. break;
  4. }
  5. $listener($event, $eventName, $this);
  6. }
  7. }
  8. /**
  9. * Sorts the internal list of listeners for the given event by priority.
  1. } else {
  2. $listeners = $this->getListeners($eventName);
  3. }
  4. if ($listeners) {
  5. $this->callListeners($listeners, $eventName, $event);
  6. }
  7. return $event;
  8. }
  1. try {
  2. $this->beforeDispatch($eventName, $event);
  3. try {
  4. $e = $this->stopwatch->start($eventName, 'section');
  5. try {
  6. $this->dispatcher->dispatch($event, $eventName);
  7. } finally {
  8. if ($e->isStarted()) {
  9. $e->stop();
  10. }
  11. }
  1. */
  2. private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response
  3. {
  4. // request
  5. $event = new RequestEvent($this, $request, $type);
  6. $this->dispatcher->dispatch($event, KernelEvents::REQUEST);
  7. if ($event->hasResponse()) {
  8. return $this->filterResponse($event->getResponse(), $request, $type);
  9. }
  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. $this->boot();
  2. ++$this->requestStackSize;
  3. $this->resetServices = true;
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. if (Kernel::VERSION_ID >= 60400) {
  7. $response->send(false);
  8. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 29)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/app/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use Shared\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. $APP_ENV = $context['APP_ENV'];
  6. $APP_DEBUG = $context['APP_DEBUG'];
  7. $APP_ID = $context['APP_ID'];

PDOException

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "batch-delete" CONTEXT: unnamed portal parameter $1 = '...'

  1. . ' Statement::bindParam() or Statement::bindValue() instead.',
  2. );
  3. }
  4. try {
  5. $this->stmt->execute($params);
  6. } catch (PDOException $exception) {
  7. throw Exception::new($exception);
  8. }
  9. return new Result($this->stmt);
  1. . ' Statement::bindParam() or Statement::bindValue() instead.',
  2. );
  3. }
  4. try {
  5. $this->stmt->execute($params);
  6. } catch (PDOException $exception) {
  7. throw Exception::new($exception);
  8. }
  9. return new Result($this->stmt);
  1. /**
  2. * {@inheritDoc}
  3. */
  4. public function execute($params = null): Result
  5. {
  6. return $this->wrappedStatement->execute($params);
  7. }
  8. }
  1. 'sql' => $this->sql,
  2. 'params' => $params ?? $this->params,
  3. 'types' => $this->types,
  4. ]);
  5. return parent::execute($params);
  6. }
  7. }
  1. /**
  2. * {@inheritDoc}
  3. */
  4. public function execute($params = null): Result
  5. {
  6. return $this->wrappedStatement->execute($params);
  7. }
  8. }
  1. $this->stopwatch?->start('doctrine', 'doctrine');
  2. $query->start();
  3. try {
  4. return parent::execute($params);
  5. } finally {
  6. $query->stop();
  7. $this->stopwatch?->stop('doctrine');
  8. }
  9. }
  1. $stmt = $connection->prepare($sql);
  2. $this->bindParameters($stmt, $params, $types);
  3. $result = $stmt->execute();
  4. } else {
  5. $result = $connection->query($sql);
  6. }
  7. return new Result($result, $this);
  1. ): object|null {
  2. $this->switchPersisterContext(null, $limit);
  3. $sql = $this->getSelectSQL($criteria, $assoc, $lockMode, $limit, null, $orderBy);
  4. [$params, $types] = $this->expandParameters($criteria);
  5. $stmt = $this->conn->executeQuery($sql, $params, $types);
  6. if ($entity !== null) {
  7. $hints[Query::HINT_REFRESH] = true;
  8. $hints[Query::HINT_REFRESH_ENTITY] = $entity;
  9. }
  1. /**
  2. * {@inheritDoc}
  3. */
  4. public function loadById(array $identifier, object|null $entity = null): object|null
  5. {
  6. return $this->load($identifier, $entity);
  7. }
  8. /**
  9. * {@inheritDoc}
  10. */
  1. case $lockMode === LockMode::PESSIMISTIC_READ:
  2. case $lockMode === LockMode::PESSIMISTIC_WRITE:
  3. return $persister->load($sortedId, null, null, [], $lockMode);
  4. default:
  5. return $persister->loadById($sortedId);
  6. }
  7. }
  8. public function getReference(string $entityName, mixed $id): object|null
  9. {
  1. * @return object|null The entity instance or NULL if the entity can not be found.
  2. * @phpstan-return ?T
  3. */
  4. public function find(mixed $id, LockMode|int|null $lockMode = null, int|null $lockVersion = null): object|null
  5. {
  6. return $this->em->find($this->entityName, $id, $lockMode, $lockVersion);
  7. }
  8. /**
  9. * Finds all entities in the repository.
  10. *
  1. * @param class-string $entityFqcn
  2. */
  3. private function getEntityInstance(string $entityFqcn, mixed $entityIdValue): object
  4. {
  5. $entityManager = $this->getEntityManager($entityFqcn);
  6. if (null === $entityInstance = $entityManager->getRepository($entityFqcn)->find($entityIdValue)) {
  7. $entityIdName = $entityManager->getClassMetadata($entityFqcn)->getIdentifierFieldNames()[0];
  8. throw new EntityNotFoundException(['entity_name' => $entityFqcn, 'entity_id_name' => $entityIdName, 'entity_id_value' => $entityIdValue]);
  9. }
  1. * @param class-string|null $entityFqcn
  2. */
  3. private function doCreate(?string $entityFqcn = null, mixed $entityId = null, string|Expression|null $entityPermission = null, ?object $entityInstance = null): EntityDto
  4. {
  5. if (null === $entityInstance && null !== $entityFqcn) {
  6. $entityInstance = null === $entityId ? null : $this->getEntityInstance($entityFqcn, $entityId);
  7. }
  8. if (null !== $entityInstance && null === $entityFqcn) {
  9. if ($entityInstance instanceof Proxy) {
  10. $entityInstance->__load();
  1. /**
  2. * @param class-string $entityFqcn
  3. */
  4. public function create(string $entityFqcn, mixed $entityId = null, string|Expression|null $entityPermission = null): EntityDto
  5. {
  6. return $this->doCreate($entityFqcn, $entityId, $entityPermission);
  7. }
  8. /**
  9. * @param object $entityInstance
  10. */
  1. // when using pretty URLs, the entity ID is passed as a request attribute (it's part of the route path);
  2. // in legacy URLs, the entity ID is passed as a regular query parameter
  3. $entityId = $request->attributes->get(EA::ENTITY_ID) ?? $request->query->get(EA::ENTITY_ID);
  4. return $this->entityFactory->create($crudDto->getEntityFqcn(), $entityId, $crudDto->getEntityPermission());
  5. }
  6. }
  1. $user = $this->getUser($this->tokenStorage);
  2. // build a first version of CrudDto without actions so we can create AdminContext, which is
  3. // needed for action extensions; later, we'll update the CrudDto object with the full action config
  4. $crudDto = $this->getCrudDto($this->adminControllers, $dashboardController, $crudController, new ActionConfigDto(), $filters, $crudAction, $pageName);
  5. $entityDto = $this->getEntityDto($request, $crudDto);
  6. $searchDto = $this->getSearchDto($request, $crudDto);
  7. $i18nDto = $this->getI18nDto($request, $dashboardDto, $crudDto, $entityDto);
  8. $templateRegistry = $this->getTemplateRegistry($dashboardController, $crudDto);
  9. $usePrettyUrls = $this->adminRouteGenerator->usesPrettyUrls();
  1. $actionName = $request->attributes->get(EA::CRUD_ACTION);
  2. $crudControllerInstance = $this->controllerFactory->getCrudControllerInstance($crudControllerFqcn, $actionName, $request);
  3. try {
  4. $adminContext = $this->adminContextFactory->create($request, $dashboardControllerInstance, $crudControllerInstance, $actionName);
  5. } catch (BaseException $e) {
  6. // if context creation fails (e.g. entity not found), create a context
  7. // without the entity so the ExceptionListener can still render the
  8. // EasyAdmin error page with the proper layout
  9. $entityId = $request->attributes->get(EA::ENTITY_ID) ?? $request->query->get(EA::ENTITY_ID);
in vendor/symfony/event-dispatcher/Debug/WrappedListener.php -> onKernelRequestPrettyUrls (line 115)
  1. $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);
  2. $e = $this->stopwatch->start($this->name, 'event_listener');
  3. try {
  4. ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
  5. } finally {
  6. if ($e->isStarted()) {
  7. $e->stop();
  8. }
  9. }
  1. foreach ($listeners as $listener) {
  2. if ($stoppable && $event->isPropagationStopped()) {
  3. break;
  4. }
  5. $listener($event, $eventName, $this);
  6. }
  7. }
  8. /**
  9. * Sorts the internal list of listeners for the given event by priority.
  1. } else {
  2. $listeners = $this->getListeners($eventName);
  3. }
  4. if ($listeners) {
  5. $this->callListeners($listeners, $eventName, $event);
  6. }
  7. return $event;
  8. }
  1. try {
  2. $this->beforeDispatch($eventName, $event);
  3. try {
  4. $e = $this->stopwatch->start($eventName, 'section');
  5. try {
  6. $this->dispatcher->dispatch($event, $eventName);
  7. } finally {
  8. if ($e->isStarted()) {
  9. $e->stop();
  10. }
  11. }
  1. */
  2. private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response
  3. {
  4. // request
  5. $event = new RequestEvent($this, $request, $type);
  6. $this->dispatcher->dispatch($event, KernelEvents::REQUEST);
  7. if ($event->hasResponse()) {
  8. return $this->filterResponse($event->getResponse(), $request, $type);
  9. }
  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. $this->boot();
  2. ++$this->requestStackSize;
  3. $this->resetServices = true;
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. if (Kernel::VERSION_ID >= 60400) {
  7. $response->send(false);
  8. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 29)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/app/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use Shared\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. $APP_ENV = $context['APP_ENV'];
  6. $APP_DEBUG = $context['APP_DEBUG'];
  7. $APP_ID = $context['APP_ID'];

Logs

No log messages

Stack Traces 3

[3/3] DriverException
Doctrine\DBAL\Exception\DriverException:
An exception occurred while executing a query: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for type integer: "batch-delete"
CONTEXT:  unnamed portal parameter $1 = '...'

  at vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php:87
  at Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter->convert(object(Exception), object(Query))
     (vendor/doctrine/dbal/src/Connection.php:1976)
  at Doctrine\DBAL\Connection->handleDriverException(object(Exception), object(Query))
     (vendor/doctrine/dbal/src/Connection.php:1918)
  at Doctrine\DBAL\Connection->convertExceptionDuringQuery(object(Exception), 'SELECT t0.estimate_material_id AS estimate_material_id_1, t0.created_at AS created_at_2, t0.deleted_at AS deleted_at_3, t0.key AS key_4, t0.quantity_real AS quantity_real_5, t0.quantity AS quantity_6, t0.price AS price_7, t0.amount AS amount_8, t0.estimate_work_id AS estimate_work_id_9, t0.material_id AS material_id_10 FROM estimate_estimates_materials t0 WHERE t0.estimate_material_id = ?', array('batch-delete'), array('integer'))
     (vendor/doctrine/dbal/src/Connection.php:1111)
  at Doctrine\DBAL\Connection->executeQuery('SELECT t0.estimate_material_id AS estimate_material_id_1, t0.created_at AS created_at_2, t0.deleted_at AS deleted_at_3, t0.key AS key_4, t0.quantity_real AS quantity_real_5, t0.quantity AS quantity_6, t0.price AS price_7, t0.amount AS amount_8, t0.estimate_work_id AS estimate_work_id_9, t0.material_id AS material_id_10 FROM estimate_estimates_materials t0 WHERE t0.estimate_material_id = ?', array('batch-delete'), array('integer'))
     (vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php:738)
  at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load(array('id' => 'batch-delete'), null)
     (vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php:756)
  at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadById(array('id' => 'batch-delete'))
     (vendor/doctrine/orm/src/EntityManager.php:366)
  at Doctrine\ORM\EntityManager->find('Estimate\\Entity\\EstimateMaterial', array(), null, null)
     (vendor/doctrine/orm/src/EntityRepository.php:86)
  at Doctrine\ORM\EntityRepository->find('batch-delete')
     (vendor/easycorp/easyadmin-bundle/src/Factory/EntityFactory.php:193)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory->getEntityInstance('Estimate\\Entity\\EstimateMaterial', 'batch-delete')
     (vendor/easycorp/easyadmin-bundle/src/Factory/EntityFactory.php:152)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory->doCreate('Estimate\\Entity\\EstimateMaterial', 'batch-delete', null)
     (vendor/easycorp/easyadmin-bundle/src/Factory/EntityFactory.php:86)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory->create('Estimate\\Entity\\EstimateMaterial', 'batch-delete', null)
     (vendor/easycorp/easyadmin-bundle/src/Factory/AdminContextFactory.php:291)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\AdminContextFactory->getEntityDto(object(Request), object(CrudDto))
     (vendor/easycorp/easyadmin-bundle/src/Factory/AdminContextFactory.php:78)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\AdminContextFactory->create(object(Request), object(DashboardController), object(EstimateMaterialCrudController), 'detail')
     (vendor/easycorp/easyadmin-bundle/src/EventListener/AdminRouterSubscriber.php:135)
  at EasyCorp\Bundle\EasyAdminBundle\EventListener\AdminRouterSubscriber->onKernelRequestPrettyUrls(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:206)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(RequestEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:126)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
     (vendor/symfony/http-kernel/HttpKernel.php:159)
  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:182)
  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:29)
  at require_once('/app/vendor/autoload_runtime.php')
     (public/index.php:5)                
[2/3] Exception
Doctrine\DBAL\Driver\PDO\Exception:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for type integer: "batch-delete"
CONTEXT:  unnamed portal parameter $1 = '...'

  at vendor/doctrine/dbal/src/Driver/PDO/Exception.php:24
  at Doctrine\DBAL\Driver\PDO\Exception::new(object(PDOException))
     (vendor/doctrine/dbal/src/Driver/PDO/Statement.php:132)
  at Doctrine\DBAL\Driver\PDO\Statement->execute(null)
     (vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php:69)
  at Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware->execute(null)
     (vendor/doctrine/dbal/src/Logging/Statement.php:98)
  at Doctrine\DBAL\Logging\Statement->execute(null)
     (vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php:69)
  at Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware->execute(null)
     (vendor/symfony/doctrine-bridge/Middleware/Debug/DBAL3/Statement.php:70)
  at Symfony\Bridge\Doctrine\Middleware\Debug\DBAL3\Statement->execute()
     (vendor/doctrine/dbal/src/Connection.php:1104)
  at Doctrine\DBAL\Connection->executeQuery('SELECT t0.estimate_material_id AS estimate_material_id_1, t0.created_at AS created_at_2, t0.deleted_at AS deleted_at_3, t0.key AS key_4, t0.quantity_real AS quantity_real_5, t0.quantity AS quantity_6, t0.price AS price_7, t0.amount AS amount_8, t0.estimate_work_id AS estimate_work_id_9, t0.material_id AS material_id_10 FROM estimate_estimates_materials t0 WHERE t0.estimate_material_id = ?', array('batch-delete'), array('integer'))
     (vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php:738)
  at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load(array('id' => 'batch-delete'), null)
     (vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php:756)
  at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadById(array('id' => 'batch-delete'))
     (vendor/doctrine/orm/src/EntityManager.php:366)
  at Doctrine\ORM\EntityManager->find('Estimate\\Entity\\EstimateMaterial', array(), null, null)
     (vendor/doctrine/orm/src/EntityRepository.php:86)
  at Doctrine\ORM\EntityRepository->find('batch-delete')
     (vendor/easycorp/easyadmin-bundle/src/Factory/EntityFactory.php:193)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory->getEntityInstance('Estimate\\Entity\\EstimateMaterial', 'batch-delete')
     (vendor/easycorp/easyadmin-bundle/src/Factory/EntityFactory.php:152)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory->doCreate('Estimate\\Entity\\EstimateMaterial', 'batch-delete', null)
     (vendor/easycorp/easyadmin-bundle/src/Factory/EntityFactory.php:86)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory->create('Estimate\\Entity\\EstimateMaterial', 'batch-delete', null)
     (vendor/easycorp/easyadmin-bundle/src/Factory/AdminContextFactory.php:291)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\AdminContextFactory->getEntityDto(object(Request), object(CrudDto))
     (vendor/easycorp/easyadmin-bundle/src/Factory/AdminContextFactory.php:78)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\AdminContextFactory->create(object(Request), object(DashboardController), object(EstimateMaterialCrudController), 'detail')
     (vendor/easycorp/easyadmin-bundle/src/EventListener/AdminRouterSubscriber.php:135)
  at EasyCorp\Bundle\EasyAdminBundle\EventListener\AdminRouterSubscriber->onKernelRequestPrettyUrls(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:206)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(RequestEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:126)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
     (vendor/symfony/http-kernel/HttpKernel.php:159)
  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:182)
  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:29)
  at require_once('/app/vendor/autoload_runtime.php')
     (public/index.php:5)                
[1/3] PDOException
PDOException:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for type integer: "batch-delete"
CONTEXT:  unnamed portal parameter $1 = '...'

  at vendor/doctrine/dbal/src/Driver/PDO/Statement.php:130
  at PDOStatement->execute(null)
     (vendor/doctrine/dbal/src/Driver/PDO/Statement.php:130)
  at Doctrine\DBAL\Driver\PDO\Statement->execute(null)
     (vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php:69)
  at Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware->execute(null)
     (vendor/doctrine/dbal/src/Logging/Statement.php:98)
  at Doctrine\DBAL\Logging\Statement->execute(null)
     (vendor/doctrine/dbal/src/Driver/Middleware/AbstractStatementMiddleware.php:69)
  at Doctrine\DBAL\Driver\Middleware\AbstractStatementMiddleware->execute(null)
     (vendor/symfony/doctrine-bridge/Middleware/Debug/DBAL3/Statement.php:70)
  at Symfony\Bridge\Doctrine\Middleware\Debug\DBAL3\Statement->execute()
     (vendor/doctrine/dbal/src/Connection.php:1104)
  at Doctrine\DBAL\Connection->executeQuery('SELECT t0.estimate_material_id AS estimate_material_id_1, t0.created_at AS created_at_2, t0.deleted_at AS deleted_at_3, t0.key AS key_4, t0.quantity_real AS quantity_real_5, t0.quantity AS quantity_6, t0.price AS price_7, t0.amount AS amount_8, t0.estimate_work_id AS estimate_work_id_9, t0.material_id AS material_id_10 FROM estimate_estimates_materials t0 WHERE t0.estimate_material_id = ?', array('batch-delete'), array('integer'))
     (vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php:738)
  at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load(array('id' => 'batch-delete'), null)
     (vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php:756)
  at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadById(array('id' => 'batch-delete'))
     (vendor/doctrine/orm/src/EntityManager.php:366)
  at Doctrine\ORM\EntityManager->find('Estimate\\Entity\\EstimateMaterial', array(), null, null)
     (vendor/doctrine/orm/src/EntityRepository.php:86)
  at Doctrine\ORM\EntityRepository->find('batch-delete')
     (vendor/easycorp/easyadmin-bundle/src/Factory/EntityFactory.php:193)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory->getEntityInstance('Estimate\\Entity\\EstimateMaterial', 'batch-delete')
     (vendor/easycorp/easyadmin-bundle/src/Factory/EntityFactory.php:152)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory->doCreate('Estimate\\Entity\\EstimateMaterial', 'batch-delete', null)
     (vendor/easycorp/easyadmin-bundle/src/Factory/EntityFactory.php:86)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\EntityFactory->create('Estimate\\Entity\\EstimateMaterial', 'batch-delete', null)
     (vendor/easycorp/easyadmin-bundle/src/Factory/AdminContextFactory.php:291)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\AdminContextFactory->getEntityDto(object(Request), object(CrudDto))
     (vendor/easycorp/easyadmin-bundle/src/Factory/AdminContextFactory.php:78)
  at EasyCorp\Bundle\EasyAdminBundle\Factory\AdminContextFactory->create(object(Request), object(DashboardController), object(EstimateMaterialCrudController), 'detail')
     (vendor/easycorp/easyadmin-bundle/src/EventListener/AdminRouterSubscriber.php:135)
  at EasyCorp\Bundle\EasyAdminBundle\EventListener\AdminRouterSubscriber->onKernelRequestPrettyUrls(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:206)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(RequestEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:126)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request')
     (vendor/symfony/http-kernel/HttpKernel.php:159)
  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:182)
  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:29)
  at require_once('/app/vendor/autoload_runtime.php')
     (public/index.php:5)