Exceptions
Exceptions 3
Doctrine\DBAL\Exception\ ConnectionException
$driverOptions = $this->params['driverOptions'] ?? [];
$user = $this->params['user'] ?? null;
$password = $this->params['password'] ?? null;
$this->_conn = $this->_driver->connect($this->params, $user, $password, $driverOptions);
$this->isConnected = true;
if ($this->autoCommit === false) {
$this->beginTransaction();
}
in
vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php->executeQuery (line 904)
{
$this->switchPersisterContext($offset, $limit);
$sql = $this->getSelectSQL($criteria, null, null, $limit, $offset, $orderBy);
list($params, $types) = $this->expandParameters($criteria);
$stmt = $this->conn->executeQuery($sql, $params, $types);
$hydrator = $this->em->newHydrator(($this->currentPersisterContext->selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);
return $hydrator->hydrateAll($stmt, $this->currentPersisterContext->rsm, [UnitOfWork::HINT_DEFEREAGERLOAD => true]
);
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
{
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
return $persister->loadAll($criteria, $orderBy, $limit, $offset);
}
/**
* Finds a single entity by a set of criteria.
*
GameTicketTypeRepository $game_ticket_type_repo,
ConfigWebsiteRepository $cw_repo
) {
$array_game_global = array();
$game_types = $game_type_repo->findAll();
$config_website = $cw_repo->findAll()[0];
$nbr_game_with_ticket = $game_repo->countGameWithTicket();
$gtt_daily = $game_ticket_type_repo->findOneBy(['reference' => 'daily']);
$gtt_loyalty = $game_ticket_type_repo->findOneBy(['reference' => 'loyalty']);
$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, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', 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) {
Doctrine\DBAL\Driver\ PDOException
$driverOptions = $this->params['driverOptions'] ?? [];
$user = $this->params['user'] ?? null;
$password = $this->params['password'] ?? null;
$this->_conn = $this->_driver->connect($this->params, $user, $password, $driverOptions);
$this->isConnected = true;
if ($this->autoCommit === false) {
$this->beginTransaction();
}
in
vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php->executeQuery (line 904)
{
$this->switchPersisterContext($offset, $limit);
$sql = $this->getSelectSQL($criteria, null, null, $limit, $offset, $orderBy);
list($params, $types) = $this->expandParameters($criteria);
$stmt = $this->conn->executeQuery($sql, $params, $types);
$hydrator = $this->em->newHydrator(($this->currentPersisterContext->selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);
return $hydrator->hydrateAll($stmt, $this->currentPersisterContext->rsm, [UnitOfWork::HINT_DEFEREAGERLOAD => true]
);
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
{
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
return $persister->loadAll($criteria, $orderBy, $limit, $offset);
}
/**
* Finds a single entity by a set of criteria.
*
GameTicketTypeRepository $game_ticket_type_repo,
ConfigWebsiteRepository $cw_repo
) {
$array_game_global = array();
$game_types = $game_type_repo->findAll();
$config_website = $cw_repo->findAll()[0];
$nbr_game_with_ticket = $game_repo->countGameWithTicket();
$gtt_daily = $game_ticket_type_repo->findOneBy(['reference' => 'daily']);
$gtt_loyalty = $game_ticket_type_repo->findOneBy(['reference' => 'loyalty']);
$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, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', 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) {
PDOException
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, $user, $password, $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [PDOStatement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, $user, $password, $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [PDOStatement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
$driverOptions = $this->params['driverOptions'] ?? [];
$user = $this->params['user'] ?? null;
$password = $this->params['password'] ?? null;
$this->_conn = $this->_driver->connect($this->params, $user, $password, $driverOptions);
$this->isConnected = true;
if ($this->autoCommit === false) {
$this->beginTransaction();
}
in
vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php->executeQuery (line 904)
{
$this->switchPersisterContext($offset, $limit);
$sql = $this->getSelectSQL($criteria, null, null, $limit, $offset, $orderBy);
list($params, $types) = $this->expandParameters($criteria);
$stmt = $this->conn->executeQuery($sql, $params, $types);
$hydrator = $this->em->newHydrator(($this->currentPersisterContext->selectJoinSql) ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);
return $hydrator->hydrateAll($stmt, $this->currentPersisterContext->rsm, [UnitOfWork::HINT_DEFEREAGERLOAD => true]
);
*/
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
{
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
return $persister->loadAll($criteria, $orderBy, $limit, $offset);
}
/**
* Finds a single entity by a set of criteria.
*
GameTicketTypeRepository $game_ticket_type_repo,
ConfigWebsiteRepository $cw_repo
) {
$array_game_global = array();
$game_types = $game_type_repo->findAll();
$config_website = $cw_repo->findAll()[0];
$nbr_game_with_ticket = $game_repo->countGameWithTicket();
$gtt_daily = $game_ticket_type_repo->findOneBy(['reference' => 'daily']);
$gtt_loyalty = $game_ticket_type_repo->findOneBy(['reference' => 'loyalty']);
$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, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', 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) {
Stack Traces 3
[3/3] ConnectionException |
---|
Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:93 at Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory', object(PDOException)) (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169) at Doctrine\DBAL\DBALException::wrapException(object(Driver), object(PDOException), 'An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory') (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:155) at Doctrine\DBAL\DBALException::driverException(object(Driver), object(PDOException)) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:28) at Doctrine\DBAL\Driver\PDOMySql\Driver->connect(array('url' => '', 'driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'host' => 'localhost', 'port' => null, 'user' => 'root', 'password' => null, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci'), 'dbname' => ''), 'root', null, array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:356) at Doctrine\DBAL\Connection->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:889) at Doctrine\DBAL\Connection->executeQuery('SELECT t0.id AS id_1, t0.name AS name_2, t0.description AS description_3, t0.reference AS reference_4, t0.created_at AS created_at_5, t0.updated_at AS updated_at_6 FROM game_type t0', array(), array()) (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:904) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadAll(array(), null, null, null) (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:181) at Doctrine\ORM\EntityRepository->findBy(array()) (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:164) at Doctrine\ORM\EntityRepository->findAll() (src/Controller/PageController.php:39) at App\Controller\PageController->homepage(object(GameTypeRepository), object(GameRepository), object(GameTicketRepository), object(GameTicketTypeRepository), object(ConfigWebsiteRepository)) (vendor/symfony/http-kernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:247) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:27) |
[2/3] PDOException |
---|
Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000] [2002] No such file or directory at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:31 at Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=localhost;dbname=;charset=utf8mb4;', 'root', null, array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:25) at Doctrine\DBAL\Driver\PDOMySql\Driver->connect(array('url' => '', 'driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'host' => 'localhost', 'port' => null, 'user' => 'root', 'password' => null, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci'), 'dbname' => ''), 'root', null, array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:356) at Doctrine\DBAL\Connection->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:889) at Doctrine\DBAL\Connection->executeQuery('SELECT t0.id AS id_1, t0.name AS name_2, t0.description AS description_3, t0.reference AS reference_4, t0.created_at AS created_at_5, t0.updated_at AS updated_at_6 FROM game_type t0', array(), array()) (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:904) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadAll(array(), null, null, null) (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:181) at Doctrine\ORM\EntityRepository->findBy(array()) (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:164) at Doctrine\ORM\EntityRepository->findAll() (src/Controller/PageController.php:39) at App\Controller\PageController->homepage(object(GameTypeRepository), object(GameRepository), object(GameTicketRepository), object(GameTicketTypeRepository), object(ConfigWebsiteRepository)) (vendor/symfony/http-kernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:247) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:27) |
[1/3] PDOException |
---|
PDOException: SQLSTATE[HY000] [2002] No such file or directory at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27 at PDO->__construct('mysql:host=localhost;dbname=;charset=utf8mb4;', 'root', null, array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:27) at Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=localhost;dbname=;charset=utf8mb4;', 'root', null, array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:25) at Doctrine\DBAL\Driver\PDOMySql\Driver->connect(array('url' => '', 'driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'host' => 'localhost', 'port' => null, 'user' => 'root', 'password' => null, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci'), 'dbname' => ''), 'root', null, array()) (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:356) at Doctrine\DBAL\Connection->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:889) at Doctrine\DBAL\Connection->executeQuery('SELECT t0.id AS id_1, t0.name AS name_2, t0.description AS description_3, t0.reference AS reference_4, t0.created_at AS created_at_5, t0.updated_at AS updated_at_6 FROM game_type t0', array(), array()) (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:904) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadAll(array(), null, null, null) (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:181) at Doctrine\ORM\EntityRepository->findBy(array()) (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:164) at Doctrine\ORM\EntityRepository->findAll() (src/Controller/PageController.php:39) at App\Controller\PageController->homepage(object(GameTypeRepository), object(GameRepository), object(GameTicketRepository), object(GameTicketTypeRepository), object(ConfigWebsiteRepository)) (vendor/symfony/http-kernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:247) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:27) |