Exceptions
Exceptions 3
Doctrine\DBAL\Exception\ ConnectionException
case '42P07':
return new TableExistsException($message, $exception);
case '08006':
return new Exception\ConnectionException($message, $exception);
case '7':
// Prior to fixing https://bugs.php.net/bug.php?id=64705 (PHP 7.3.22 and PHP 7.4.10),
// in some cases (mainly connection errors) the PDO exception wouldn't provide a SQLSTATE via its code.
// The exception code would be always set to 7 here.
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php
->
convertException
(line 182)
if ($driverEx instanceof DriverException) {
return $driverEx;
}
if ($driver instanceof ExceptionConverterDriver && $driverEx instanceof DeprecatedDriverException) {
return $driver->convertException($msg, $driverEx);
}
return new Exception($msg, 0, $driverEx);
}
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php
::
wrapException
(line 169)
*
* @return Exception
*/
public static function driverException(Driver $driver, Throwable $driverEx)
{
return self::wrapException($driver, $driverEx, 'An exception occurred in driver: ' . $driverEx->getMessage());
}
/**
* @return Exception
*/
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
::
driverException
(line 52)
$pdo->exec('SET NAMES \'' . $params['charset'] . '\'');
}
return $pdo;
} catch (PDOException $e) {
throw Exception::driverException($this, $e);
}
}
/**
* Constructs the Postgres PDO DSN.
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
->
connect
(line 412)
$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->transactionNestingLevel = 0;
if ($this->autoCommit === false) {
$this->beginTransaction();
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
->
connect
(line 1952)
*
* @return DriverConnection
*/
public function getWrappedConnection()
{
$this->connect();
assert($this->_conn !== null);
return $this->_conn;
}
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
->
getWrappedConnection
(line 1290)
{
if ($qcp !== null) {
return $this->executeCacheQuery($sql, $params, $types, $qcp);
}
$connection = $this->getWrappedConnection();
$logger = $this->_config->getSQLLogger();
if ($logger) {
$logger->startQuery($sql, $params, $types);
}
in
vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
->
executeQuery
(line 750)
{
$this->switchPersisterContext(null, $limit);
$sql = $this->getSelectSQL($criteria, $assoc, $lockMode, $limit, null, $orderBy);
[$params, $types] = $this->expandParameters($criteria);
$stmt = $this->conn->executeQuery($sql, $params, $types);
if ($entity !== null) {
$hints[Query::HINT_REFRESH] = true;
$hints[Query::HINT_REFRESH_ENTITY] = $entity;
}
in
vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php
->
load
(line 241)
*/
public function findOneBy(array $criteria, ?array $orderBy = null)
{
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
return $persister->load($criteria, null, null, [], null, 1, $orderBy);
}
/**
* Counts entities by a set of criteria.
*
in
vendor/kematjaya/user-bundle/src/Repo/KmjUserRepository.php
->
findOneBy
(line 37)
return $this->find($identityNumber);
}
public function findOneByUsernameAndActive(string $username): ?KmjUserInterface
{
return $this->findOneBy(['username' => $username, 'is_active' => true]);
}
}
in
vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php
->
findOneByUsernameAndActive
(line 141)
{
if (null !== $this->error) {
throw new CustomUserMessageAuthenticationException($this->error);
}
$user = $this->kmjUserRepo->findOneByUsernameAndActive($credentials['username']);
if (!$user) {
throw new CustomUserMessageAuthenticationException('Username could not be found.');
}
in
vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php
->
getUser
(line 113)
}
private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator, PreAuthenticationGuardToken $token): GuardTokenInterface
{
// get the user from the GuardAuthenticator
$user = $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider);
if (null === $user) {
$e = new UserNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator)));
// @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
$e->setUserIdentifier(method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername());
in
vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php
->
authenticateViaGuard
(line 107)
if (null === $guardAuthenticator) {
throw new AuthenticationException(sprintf('Token with provider key "%s" did not originate from any of the guard authenticators of provider "%s".', $token->getGuardProviderKey(), $this->providerKey));
}
return $this->authenticateViaGuard($guardAuthenticator, $token);
}
private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator, PreAuthenticationGuardToken $token): GuardTokenInterface
{
// get the user from the GuardAuthenticator
in
vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php
->
authenticate
(line 88)
if (!$provider->supports($token)) {
continue;
}
try {
$result = $provider->authenticate($token);
if (null !== $result) {
break;
}
} catch (AccountStatusException $e) {
in
vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php
->
authenticate
(line 162)
if (null !== $this->logger) {
$this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]);
}
// pass the token into the AuthenticationManager system
// this indirectly calls GuardAuthenticationProvider::authenticate()
$token = $this->authenticationManager->authenticate($token);
if (null !== $this->logger) {
$this->logger->info('Guard authentication successful!', ['token' => $token, 'authenticator' => \get_class($guardAuthenticator)]);
}
in
vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php
->
executeGuardAuthenticator
(line 126)
foreach ($guardAuthenticators as $key => $guardAuthenticator) {
// get a key that's unique to *this* guard authenticator
// this MUST be the same as GuardAuthenticationProvider
$uniqueGuardKey = $this->providerKey.'_'.$key;
$this->executeGuardAuthenticator($uniqueGuardKey, $guardAuthenticator, $event);
if ($event->hasResponse()) {
if (null !== $this->logger) {
$this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => \get_class($guardAuthenticator)]);
}
in
vendor/symfony/security-bundle/Debug/WrappedLazyListener.php
->
authenticate
(line 49)
public function authenticate(RequestEvent $event)
{
$startTime = microtime(true);
try {
$ret = $this->listener->authenticate($event);
} catch (LazyResponseException $e) {
$this->response = $e->getResponse();
throw $e;
} finally {
in
vendor/symfony/security-http/Firewall/AbstractListener.php
->
authenticate
(line 26)
abstract class AbstractListener implements FirewallListenerInterface
{
final public function __invoke(RequestEvent $event)
{
if (false !== $this->supports($event->getRequest())) {
$this->authenticate($event);
}
}
public static function getPriority(): int
{
in
vendor/symfony/security-bundle/Security/LazyFirewallContext.php
->
__invoke
(line 60)
}
}
if (!$lazy) {
foreach ($listeners as $listener) {
$listener($event);
if ($event->hasResponse()) {
return;
}
}
in
vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php
->
__invoke
(line 70)
}
}
$this->listeners = $listeners;
}, $listener, FirewallContext::class)();
$listener($event);
} else {
$wrappedListener = $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener);
$wrappedListener($event);
$wrappedListeners[] = $wrappedListener->getInfo();
if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) {
in
vendor/symfony/security-http/Firewall.php
->
callListeners
(line 92)
if (null !== $logoutListener) {
yield $logoutListener;
}
};
$this->callListeners($event, $authenticationListeners());
}
public function onKernelFinishRequest(FinishRequestEvent $event)
{
$request = $event->getRequest();
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelRequest
(line 118)
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 230)
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 59)
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 154)
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 139)
*/
private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response
{
// request
$event = new RequestEvent($this, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Debug::enable();
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Doctrine\DBAL\Driver\PDO\ Exception
*/
final class Exception extends PDOException
{
public static function new(\PDOException $exception): self
{
return new self($exception);
}
}
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
::
new
(line 44)
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
}
/**
* {@inheritdoc}
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
->
__construct
(line 27)
*/
public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
{
try {
$pdo = new PDO\Connection(
$this->_constructPdoDsn($params),
$username,
$password,
$driverOptions
);
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
->
connect
(line 412)
$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->transactionNestingLevel = 0;
if ($this->autoCommit === false) {
$this->beginTransaction();
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
->
connect
(line 1952)
*
* @return DriverConnection
*/
public function getWrappedConnection()
{
$this->connect();
assert($this->_conn !== null);
return $this->_conn;
}
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
->
getWrappedConnection
(line 1290)
{
if ($qcp !== null) {
return $this->executeCacheQuery($sql, $params, $types, $qcp);
}
$connection = $this->getWrappedConnection();
$logger = $this->_config->getSQLLogger();
if ($logger) {
$logger->startQuery($sql, $params, $types);
}
in
vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
->
executeQuery
(line 750)
{
$this->switchPersisterContext(null, $limit);
$sql = $this->getSelectSQL($criteria, $assoc, $lockMode, $limit, null, $orderBy);
[$params, $types] = $this->expandParameters($criteria);
$stmt = $this->conn->executeQuery($sql, $params, $types);
if ($entity !== null) {
$hints[Query::HINT_REFRESH] = true;
$hints[Query::HINT_REFRESH_ENTITY] = $entity;
}
in
vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php
->
load
(line 241)
*/
public function findOneBy(array $criteria, ?array $orderBy = null)
{
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
return $persister->load($criteria, null, null, [], null, 1, $orderBy);
}
/**
* Counts entities by a set of criteria.
*
in
vendor/kematjaya/user-bundle/src/Repo/KmjUserRepository.php
->
findOneBy
(line 37)
return $this->find($identityNumber);
}
public function findOneByUsernameAndActive(string $username): ?KmjUserInterface
{
return $this->findOneBy(['username' => $username, 'is_active' => true]);
}
}
in
vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php
->
findOneByUsernameAndActive
(line 141)
{
if (null !== $this->error) {
throw new CustomUserMessageAuthenticationException($this->error);
}
$user = $this->kmjUserRepo->findOneByUsernameAndActive($credentials['username']);
if (!$user) {
throw new CustomUserMessageAuthenticationException('Username could not be found.');
}
in
vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php
->
getUser
(line 113)
}
private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator, PreAuthenticationGuardToken $token): GuardTokenInterface
{
// get the user from the GuardAuthenticator
$user = $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider);
if (null === $user) {
$e = new UserNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator)));
// @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
$e->setUserIdentifier(method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername());
in
vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php
->
authenticateViaGuard
(line 107)
if (null === $guardAuthenticator) {
throw new AuthenticationException(sprintf('Token with provider key "%s" did not originate from any of the guard authenticators of provider "%s".', $token->getGuardProviderKey(), $this->providerKey));
}
return $this->authenticateViaGuard($guardAuthenticator, $token);
}
private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator, PreAuthenticationGuardToken $token): GuardTokenInterface
{
// get the user from the GuardAuthenticator
in
vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php
->
authenticate
(line 88)
if (!$provider->supports($token)) {
continue;
}
try {
$result = $provider->authenticate($token);
if (null !== $result) {
break;
}
} catch (AccountStatusException $e) {
in
vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php
->
authenticate
(line 162)
if (null !== $this->logger) {
$this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]);
}
// pass the token into the AuthenticationManager system
// this indirectly calls GuardAuthenticationProvider::authenticate()
$token = $this->authenticationManager->authenticate($token);
if (null !== $this->logger) {
$this->logger->info('Guard authentication successful!', ['token' => $token, 'authenticator' => \get_class($guardAuthenticator)]);
}
in
vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php
->
executeGuardAuthenticator
(line 126)
foreach ($guardAuthenticators as $key => $guardAuthenticator) {
// get a key that's unique to *this* guard authenticator
// this MUST be the same as GuardAuthenticationProvider
$uniqueGuardKey = $this->providerKey.'_'.$key;
$this->executeGuardAuthenticator($uniqueGuardKey, $guardAuthenticator, $event);
if ($event->hasResponse()) {
if (null !== $this->logger) {
$this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => \get_class($guardAuthenticator)]);
}
in
vendor/symfony/security-bundle/Debug/WrappedLazyListener.php
->
authenticate
(line 49)
public function authenticate(RequestEvent $event)
{
$startTime = microtime(true);
try {
$ret = $this->listener->authenticate($event);
} catch (LazyResponseException $e) {
$this->response = $e->getResponse();
throw $e;
} finally {
in
vendor/symfony/security-http/Firewall/AbstractListener.php
->
authenticate
(line 26)
abstract class AbstractListener implements FirewallListenerInterface
{
final public function __invoke(RequestEvent $event)
{
if (false !== $this->supports($event->getRequest())) {
$this->authenticate($event);
}
}
public static function getPriority(): int
{
in
vendor/symfony/security-bundle/Security/LazyFirewallContext.php
->
__invoke
(line 60)
}
}
if (!$lazy) {
foreach ($listeners as $listener) {
$listener($event);
if ($event->hasResponse()) {
return;
}
}
in
vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php
->
__invoke
(line 70)
}
}
$this->listeners = $listeners;
}, $listener, FirewallContext::class)();
$listener($event);
} else {
$wrappedListener = $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener);
$wrappedListener($event);
$wrappedListeners[] = $wrappedListener->getInfo();
if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) {
in
vendor/symfony/security-http/Firewall.php
->
callListeners
(line 92)
if (null !== $logoutListener) {
yield $logoutListener;
}
};
$this->callListeners($event, $authenticationListeners());
}
public function onKernelFinishRequest(FinishRequestEvent $event)
{
$request = $event->getRequest();
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelRequest
(line 118)
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 230)
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 59)
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 154)
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 139)
*/
private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response
{
// request
$event = new RequestEvent($this, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Debug::enable();
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
PDOException
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
->
__construct
(line 40)
* @throws PDOException In case of an error.
*/
public function __construct($dsn, $user = null, $password = null, ?array $options = null)
{
try {
parent::__construct($dsn, (string) $user, (string) $password, (array) $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, [Statement::class, []]);
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $exception) {
throw Exception::new($exception);
}
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
->
__construct
(line 27)
*/
public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
{
try {
$pdo = new PDO\Connection(
$this->_constructPdoDsn($params),
$username,
$password,
$driverOptions
);
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
->
connect
(line 412)
$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->transactionNestingLevel = 0;
if ($this->autoCommit === false) {
$this->beginTransaction();
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
->
connect
(line 1952)
*
* @return DriverConnection
*/
public function getWrappedConnection()
{
$this->connect();
assert($this->_conn !== null);
return $this->_conn;
}
in
vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
->
getWrappedConnection
(line 1290)
{
if ($qcp !== null) {
return $this->executeCacheQuery($sql, $params, $types, $qcp);
}
$connection = $this->getWrappedConnection();
$logger = $this->_config->getSQLLogger();
if ($logger) {
$logger->startQuery($sql, $params, $types);
}
in
vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php
->
executeQuery
(line 750)
{
$this->switchPersisterContext(null, $limit);
$sql = $this->getSelectSQL($criteria, $assoc, $lockMode, $limit, null, $orderBy);
[$params, $types] = $this->expandParameters($criteria);
$stmt = $this->conn->executeQuery($sql, $params, $types);
if ($entity !== null) {
$hints[Query::HINT_REFRESH] = true;
$hints[Query::HINT_REFRESH_ENTITY] = $entity;
}
in
vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php
->
load
(line 241)
*/
public function findOneBy(array $criteria, ?array $orderBy = null)
{
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
return $persister->load($criteria, null, null, [], null, 1, $orderBy);
}
/**
* Counts entities by a set of criteria.
*
in
vendor/kematjaya/user-bundle/src/Repo/KmjUserRepository.php
->
findOneBy
(line 37)
return $this->find($identityNumber);
}
public function findOneByUsernameAndActive(string $username): ?KmjUserInterface
{
return $this->findOneBy(['username' => $username, 'is_active' => true]);
}
}
in
vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php
->
findOneByUsernameAndActive
(line 141)
{
if (null !== $this->error) {
throw new CustomUserMessageAuthenticationException($this->error);
}
$user = $this->kmjUserRepo->findOneByUsernameAndActive($credentials['username']);
if (!$user) {
throw new CustomUserMessageAuthenticationException('Username could not be found.');
}
in
vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php
->
getUser
(line 113)
}
private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator, PreAuthenticationGuardToken $token): GuardTokenInterface
{
// get the user from the GuardAuthenticator
$user = $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider);
if (null === $user) {
$e = new UserNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator)));
// @deprecated since Symfony 5.3, change to $token->getUserIdentifier() in 6.0
$e->setUserIdentifier(method_exists($token, 'getUserIdentifier') ? $token->getUserIdentifier() : $token->getUsername());
in
vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php
->
authenticateViaGuard
(line 107)
if (null === $guardAuthenticator) {
throw new AuthenticationException(sprintf('Token with provider key "%s" did not originate from any of the guard authenticators of provider "%s".', $token->getGuardProviderKey(), $this->providerKey));
}
return $this->authenticateViaGuard($guardAuthenticator, $token);
}
private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator, PreAuthenticationGuardToken $token): GuardTokenInterface
{
// get the user from the GuardAuthenticator
in
vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php
->
authenticate
(line 88)
if (!$provider->supports($token)) {
continue;
}
try {
$result = $provider->authenticate($token);
if (null !== $result) {
break;
}
} catch (AccountStatusException $e) {
in
vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php
->
authenticate
(line 162)
if (null !== $this->logger) {
$this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]);
}
// pass the token into the AuthenticationManager system
// this indirectly calls GuardAuthenticationProvider::authenticate()
$token = $this->authenticationManager->authenticate($token);
if (null !== $this->logger) {
$this->logger->info('Guard authentication successful!', ['token' => $token, 'authenticator' => \get_class($guardAuthenticator)]);
}
in
vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php
->
executeGuardAuthenticator
(line 126)
foreach ($guardAuthenticators as $key => $guardAuthenticator) {
// get a key that's unique to *this* guard authenticator
// this MUST be the same as GuardAuthenticationProvider
$uniqueGuardKey = $this->providerKey.'_'.$key;
$this->executeGuardAuthenticator($uniqueGuardKey, $guardAuthenticator, $event);
if ($event->hasResponse()) {
if (null !== $this->logger) {
$this->logger->debug('The "{authenticator}" authenticator set the response. Any later authenticator will not be called', ['authenticator' => \get_class($guardAuthenticator)]);
}
in
vendor/symfony/security-bundle/Debug/WrappedLazyListener.php
->
authenticate
(line 49)
public function authenticate(RequestEvent $event)
{
$startTime = microtime(true);
try {
$ret = $this->listener->authenticate($event);
} catch (LazyResponseException $e) {
$this->response = $e->getResponse();
throw $e;
} finally {
in
vendor/symfony/security-http/Firewall/AbstractListener.php
->
authenticate
(line 26)
abstract class AbstractListener implements FirewallListenerInterface
{
final public function __invoke(RequestEvent $event)
{
if (false !== $this->supports($event->getRequest())) {
$this->authenticate($event);
}
}
public static function getPriority(): int
{
in
vendor/symfony/security-bundle/Security/LazyFirewallContext.php
->
__invoke
(line 60)
}
}
if (!$lazy) {
foreach ($listeners as $listener) {
$listener($event);
if ($event->hasResponse()) {
return;
}
}
in
vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php
->
__invoke
(line 70)
}
}
$this->listeners = $listeners;
}, $listener, FirewallContext::class)();
$listener($event);
} else {
$wrappedListener = $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener);
$wrappedListener($event);
$wrappedListeners[] = $wrappedListener->getInfo();
if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) {
in
vendor/symfony/security-http/Firewall.php
->
callListeners
(line 92)
if (null !== $logoutListener) {
yield $logoutListener;
}
};
$this->callListeners($event, $authenticationListeners());
}
public function onKernelFinishRequest(FinishRequestEvent $event)
{
$request = $event->getRequest();
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelRequest
(line 118)
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 230)
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 59)
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 154)
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 139)
*/
private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response
{
// request
$event = new RequestEvent($this, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Debug::enable();
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Stack Traces 3
[3/3]
ConnectionException
|
---|
Doctrine\DBAL\Exception\ConnectionException: An exception occurred in driver: SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php:88 at Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException() (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:182) at Doctrine\DBAL\DBALException::wrapException() (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:169) at Doctrine\DBAL\DBALException::driverException() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php:52) at Doctrine\DBAL\Driver\PDOPgSql\Driver->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412) at Doctrine\DBAL\Connection->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1952) at Doctrine\DBAL\Connection->getWrappedConnection() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1290) at Doctrine\DBAL\Connection->executeQuery() (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:750) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load() (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:241) at Doctrine\ORM\EntityRepository->findOneBy() (vendor/kematjaya/user-bundle/src/Repo/KmjUserRepository.php:37) at Kematjaya\UserBundle\Repo\KmjUserRepository->findOneByUsernameAndActive() (vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php:141) at Kematjaya\UserBundle\Security\KmjLoginAuthenticator->getUser() (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:113) at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticateViaGuard() (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:107) at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticate() (vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php:88) at Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager->authenticate() (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:162) at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->executeGuardAuthenticator() (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:126) at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->authenticate() (vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:49) at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate() (vendor/symfony/security-http/Firewall/AbstractListener.php:26) at Symfony\Component\Security\Http\Firewall\AbstractListener->__invoke() (vendor/symfony/security-bundle/Security/LazyFirewallContext.php:60) at Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext->__invoke() (vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:70) at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners() (vendor/symfony/security-http/Firewall.php:92) at Symfony\Component\Security\Http\Firewall->onKernelRequest() (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:139) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:20) |
[2/3]
Exception
|
---|
Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? 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/PDOConnection.php:44) at Doctrine\DBAL\Driver\PDOConnection->__construct() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php:27) at Doctrine\DBAL\Driver\PDOPgSql\Driver->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412) at Doctrine\DBAL\Connection->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1952) at Doctrine\DBAL\Connection->getWrappedConnection() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1290) at Doctrine\DBAL\Connection->executeQuery() (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:750) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load() (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:241) at Doctrine\ORM\EntityRepository->findOneBy() (vendor/kematjaya/user-bundle/src/Repo/KmjUserRepository.php:37) at Kematjaya\UserBundle\Repo\KmjUserRepository->findOneByUsernameAndActive() (vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php:141) at Kematjaya\UserBundle\Security\KmjLoginAuthenticator->getUser() (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:113) at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticateViaGuard() (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:107) at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticate() (vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php:88) at Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager->authenticate() (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:162) at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->executeGuardAuthenticator() (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:126) at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->authenticate() (vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:49) at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate() (vendor/symfony/security-http/Firewall/AbstractListener.php:26) at Symfony\Component\Security\Http\Firewall\AbstractListener->__invoke() (vendor/symfony/security-bundle/Security/LazyFirewallContext.php:60) at Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext->__invoke() (vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:70) at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners() (vendor/symfony/security-http/Firewall.php:92) at Symfony\Component\Security\Http\Firewall->onKernelRequest() (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:139) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:20) |
[1/3]
PDOException
|
---|
PDOException: SQLSTATE[08006] [7] connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? at vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40 at PDO->__construct() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40) at Doctrine\DBAL\Driver\PDOConnection->__construct() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php:27) at Doctrine\DBAL\Driver\PDOPgSql\Driver->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:412) at Doctrine\DBAL\Connection->connect() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1952) at Doctrine\DBAL\Connection->getWrappedConnection() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1290) at Doctrine\DBAL\Connection->executeQuery() (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:750) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->load() (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:241) at Doctrine\ORM\EntityRepository->findOneBy() (vendor/kematjaya/user-bundle/src/Repo/KmjUserRepository.php:37) at Kematjaya\UserBundle\Repo\KmjUserRepository->findOneByUsernameAndActive() (vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php:141) at Kematjaya\UserBundle\Security\KmjLoginAuthenticator->getUser() (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:113) at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticateViaGuard() (vendor/symfony/security-guard/Provider/GuardAuthenticationProvider.php:107) at Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider->authenticate() (vendor/symfony/security-core/Authentication/AuthenticationProviderManager.php:88) at Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager->authenticate() (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:162) at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->executeGuardAuthenticator() (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:126) at Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener->authenticate() (vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:49) at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate() (vendor/symfony/security-http/Firewall/AbstractListener.php:26) at Symfony\Component\Security\Http\Firewall\AbstractListener->__invoke() (vendor/symfony/security-bundle/Security/LazyFirewallContext.php:60) at Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext->__invoke() (vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:70) at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners() (vendor/symfony/security-http/Firewall.php:92) at Symfony\Component\Security\Http\Firewall->onKernelRequest() (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke() (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:139) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:20) |