case '2002':
case '2005':
return new ConnectionException($message, $exception);
case '2006':
return new ConnectionLost($message, $exception);
case '1048':
case '1121':
case '1138':
case '1171':
if ($driverEx instanceof DriverException) {
return $driverEx;
}
if ($driver instanceof ExceptionConverterDriver && $driverEx instanceof DeprecatedDriverException) {
return $driver->convertException($msg, $driverEx);
}
return new Exception($msg, 0, $driverEx);
}
$msg .= ' with params ' . self::formatParameters($params);
}
$msg .= ":\n\n" . $driverEx->getMessage();
return static::wrapException($driver, $driverEx, $msg);
}
/**
* @deprecated
*
$this->throw(
Exception::driverExceptionDuringQuery(
$this->_driver,
$e,
$sql,
$this->resolveParams($params, $types)
)
);
}
/**
} else {
$stmt = $connection->query($sql);
}
} catch (Throwable $e) {
$this->handleExceptionDuringQuery(
$e,
$sql,
$params,
$types
);
}
*
* @return ResultStatement
*/
public function execute(Connection $conn, array $params, array $types)
{
return $conn->executeQuery($this->_sqlStatements, $params, $types, $this->queryCacheProfile);
}
}
$sqlParams,
$types,
$this->_em->getConnection()->getParams()
);
return $executor->execute($this->_em->getConnection(), $sqlParams, $types);
}
/**
* @param array<string,mixed> $sqlParams
* @param array<string,Type> $types
$cache->save($cacheKey, $result, $queryCacheProfile->getLifetime());
};
}
$stmt = $this->_doExecute();
if (is_numeric($stmt)) {
$setCacheEntry($stmt);
return $stmt;
{
if ($this->cacheable && $this->isCacheEnabled()) {
return $this->executeUsingQueryCache($parameters, $hydrationMode);
}
return $this->executeIgnoreQueryCache($parameters, $hydrationMode);
}
/**
* Execute query ignoring second level cache.
*
*
* @return mixed
*/
public function getResult($hydrationMode = self::HYDRATE_OBJECT)
{
return $this->execute(null, $hydrationMode);
}
/**
* Gets the array of results for the query.
*
}
return $query
->orderBy('n.id', 'ASC')
->getQuery()
->getResult();
}
}
foreach($this->getDoctrine()->getRepository(Cart::class)->findBy($this->userIdentifier->get()) as $item) {
$cart[$item->getItem()->getId()] = $item->getQuantity();
}
$nodeSpareRepository = $this->getDoctrine()->getRepository(NodeSpare::class);
foreach($nodeSpareRepository->getSpares($node, $searchArticle) as $spares) {
$normalizedSpares[$spares->getSpare()->getId()] = ['item' => $spares, 'in' => []];
foreach($spares->getNodeSpareSubModels() as $subModel) {
$normalizedSpares[$spares->getSpare()->getId()]['in'][$subModel->getSubModel()->getId()] = [$subModel, $cart[$subModel->getId()] ?? 0];
}
}
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
*/
final class Exception extends PDOException
{
public static function new(\PDOException $exception): self
{
return new self($exception);
}
}
public function execute($params = null)
{
try {
return parent::execute($params);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
[$sql, $params, $types] = SQLParserUtils::expandListParameters($sql, $params, $types);
$stmt = $connection->prepare($sql);
if ($types) {
$this->_bindTypedValues($stmt, $params, $types);
$stmt->execute();
} else {
$stmt->execute($params);
}
} else {
$stmt = $connection->query($sql);
*
* @return ResultStatement
*/
public function execute(Connection $conn, array $params, array $types)
{
return $conn->executeQuery($this->_sqlStatements, $params, $types, $this->queryCacheProfile);
}
}
$sqlParams,
$types,
$this->_em->getConnection()->getParams()
);
return $executor->execute($this->_em->getConnection(), $sqlParams, $types);
}
/**
* @param array<string,mixed> $sqlParams
* @param array<string,Type> $types
$cache->save($cacheKey, $result, $queryCacheProfile->getLifetime());
};
}
$stmt = $this->_doExecute();
if (is_numeric($stmt)) {
$setCacheEntry($stmt);
return $stmt;
{
if ($this->cacheable && $this->isCacheEnabled()) {
return $this->executeUsingQueryCache($parameters, $hydrationMode);
}
return $this->executeIgnoreQueryCache($parameters, $hydrationMode);
}
/**
* Execute query ignoring second level cache.
*
*
* @return mixed
*/
public function getResult($hydrationMode = self::HYDRATE_OBJECT)
{
return $this->execute(null, $hydrationMode);
}
/**
* Gets the array of results for the query.
*
}
return $query
->orderBy('n.id', 'ASC')
->getQuery()
->getResult();
}
}
foreach($this->getDoctrine()->getRepository(Cart::class)->findBy($this->userIdentifier->get()) as $item) {
$cart[$item->getItem()->getId()] = $item->getQuantity();
}
$nodeSpareRepository = $this->getDoctrine()->getRepository(NodeSpare::class);
foreach($nodeSpareRepository->getSpares($node, $searchArticle) as $spares) {
$normalizedSpares[$spares->getSpare()->getId()] = ['item' => $spares, 'in' => []];
foreach($spares->getNodeSpareSubModels() as $subModel) {
$normalizedSpares[$spares->getSpare()->getId()]['in'][$subModel->getSubModel()->getId()] = [$subModel, $cart[$subModel->getId()] ?? 0];
}
}
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
* {@inheritdoc}
*/
public function execute($params = null)
{
try {
return parent::execute($params);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
* {@inheritdoc}
*/
public function execute($params = null)
{
try {
return parent::execute($params);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
[$sql, $params, $types] = SQLParserUtils::expandListParameters($sql, $params, $types);
$stmt = $connection->prepare($sql);
if ($types) {
$this->_bindTypedValues($stmt, $params, $types);
$stmt->execute();
} else {
$stmt->execute($params);
}
} else {
$stmt = $connection->query($sql);
*
* @return ResultStatement
*/
public function execute(Connection $conn, array $params, array $types)
{
return $conn->executeQuery($this->_sqlStatements, $params, $types, $this->queryCacheProfile);
}
}
$sqlParams,
$types,
$this->_em->getConnection()->getParams()
);
return $executor->execute($this->_em->getConnection(), $sqlParams, $types);
}
/**
* @param array<string,mixed> $sqlParams
* @param array<string,Type> $types
$cache->save($cacheKey, $result, $queryCacheProfile->getLifetime());
};
}
$stmt = $this->_doExecute();
if (is_numeric($stmt)) {
$setCacheEntry($stmt);
return $stmt;
{
if ($this->cacheable && $this->isCacheEnabled()) {
return $this->executeUsingQueryCache($parameters, $hydrationMode);
}
return $this->executeIgnoreQueryCache($parameters, $hydrationMode);
}
/**
* Execute query ignoring second level cache.
*
*
* @return mixed
*/
public function getResult($hydrationMode = self::HYDRATE_OBJECT)
{
return $this->execute(null, $hydrationMode);
}
/**
* Gets the array of results for the query.
*
}
return $query
->orderBy('n.id', 'ASC')
->getQuery()
->getResult();
}
}
foreach($this->getDoctrine()->getRepository(Cart::class)->findBy($this->userIdentifier->get()) as $item) {
$cart[$item->getItem()->getId()] = $item->getQuantity();
}
$nodeSpareRepository = $this->getDoctrine()->getRepository(NodeSpare::class);
foreach($nodeSpareRepository->getSpares($node, $searchArticle) as $spares) {
$normalizedSpares[$spares->getSpare()->getId()] = ['item' => $spares, 'in' => []];
foreach($spares->getNodeSpareSubModels() as $subModel) {
$normalizedSpares[$spares->getSpare()->getId()]['in'][$subModel->getSubModel()->getId()] = [$subModel, $cart[$subModel->getId()] ?? 0];
}
}
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
No log messages
[3/3]
ConnectionLost
|
---|
Doctrine\DBAL\Exception\ConnectionLost: An exception occurred while executing 'SELECT n0_.id AS id_0, n0_.position AS position_1, n0_.node_id AS node_id_2, n0_.spare_id AS spare_id_3 FROM node_spare n0_ WHERE n0_.node_id = ? ORDER BY n0_.id ASC' with params [1403]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115 at Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException() (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:182) at Doctrine\DBAL\DBALException::wrapException() (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:159) at Doctrine\DBAL\DBALException::driverExceptionDuringQuery() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:2212) at Doctrine\DBAL\Connection->handleExceptionDuringQuery() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1299) at Doctrine\DBAL\Connection->executeQuery() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php:47) at Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:330) at Doctrine\ORM\Query->_doExecute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:1075) at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:1028) at Doctrine\ORM\AbstractQuery->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:787) at Doctrine\ORM\AbstractQuery->getResult() (src/Repository/NodeSpareRepository.php:69) at App\Repository\NodeSpareRepository->getSpares() (src/Controller/ModelController.php:134) at App\Controller\ModelController->node() (vendor/symfony/http-kernel/HttpKernel.php:157) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:199) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:37) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/home/bm-support/web/bm-support.ru/public_html/vendor/autoload_runtime.php') (public/index.php:5) |
[2/3]
Exception
|
---|
Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18 at Doctrine\DBAL\Driver\PDO\Exception::new() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:114) at Doctrine\DBAL\Driver\PDOStatement->execute() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1290) at Doctrine\DBAL\Connection->executeQuery() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php:47) at Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:330) at Doctrine\ORM\Query->_doExecute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:1075) at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:1028) at Doctrine\ORM\AbstractQuery->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:787) at Doctrine\ORM\AbstractQuery->getResult() (src/Repository/NodeSpareRepository.php:69) at App\Repository\NodeSpareRepository->getSpares() (src/Controller/ModelController.php:134) at App\Controller\ModelController->node() (vendor/symfony/http-kernel/HttpKernel.php:157) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:199) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:37) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/home/bm-support/web/bm-support.ru/public_html/vendor/autoload_runtime.php') (public/index.php:5) |
[1/3]
PDOException
|
---|
PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112 at PDOStatement->execute() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112) at Doctrine\DBAL\Driver\PDOStatement->execute() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1290) at Doctrine\DBAL\Connection->executeQuery() (vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php:47) at Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:330) at Doctrine\ORM\Query->_doExecute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:1075) at Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:1028) at Doctrine\ORM\AbstractQuery->execute() (vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php:787) at Doctrine\ORM\AbstractQuery->getResult() (src/Repository/NodeSpareRepository.php:69) at App\Repository\NodeSpareRepository->getSpares() (src/Controller/ModelController.php:134) at App\Controller\ModelController->node() (vendor/symfony/http-kernel/HttpKernel.php:157) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:199) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:37) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/home/bm-support/web/bm-support.ru/public_html/vendor/autoload_runtime.php') (public/index.php:5) |