Error 500 Internal Server Error

POST https://simplexsms.com/en/register?path=en%2Fregister

Forwarded to ErrorController (6b51e5)

Exceptions

An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused

  • Exceptions 3
  • Logs
  • Stack Traces 3

Doctrine\DBAL\Exception\ ConnectionException

  1.             case 1370:
  2.             case 1429:
  3.             case 2002:
  4.             case 2005:
  5.             case 2054:
  6.                 return new ConnectionException($exception$query);
  7.             case 2006:
  8.                 return new ConnectionLost($exception$query);
  9.             case 1048:
  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 1884)
  1.     }
  2.     /** @internal */
  3.     final public function convertException(Driver\Exception $e): DriverException
  4.     {
  5.         return $this->handleDriverException($enull);
  6.     }
  7.     /**
  8.      * @param array<int, mixed>|array<string, mixed>                               $params
  9.      * @param array<int, int|string|Type|null>|array<string, int|string|Type|null> $types
in vendor/doctrine/dbal/src/Connection.php -> convertException (line 377)
  1.         }
  2.         try {
  3.             $this->_conn $this->_driver->connect($this->params);
  4.         } catch (Driver\Exception $e) {
  5.             throw $this->convertException($e);
  6.         }
  7.         if ($this->autoCommit === false) {
  8.             $this->beginTransaction();
  9.         }
  1.             'https://github.com/doctrine/dbal/issues/4966',
  2.             'Connection::getWrappedConnection() is deprecated.'
  3.                 ' Use Connection::getNativeConnection() to access the native connection.',
  4.         );
  5.         $this->connect();
  6.         return $this->_conn;
  7.     }
  8.     /** @return resource|object */
in vendor/doctrine/dbal/src/Connection.php -> getWrappedConnection (line 1079)
  1.     ): Result {
  2.         if ($qcp !== null) {
  3.             return $this->executeCacheQuery($sql$params$types$qcp);
  4.         }
  5.         $connection $this->getWrappedConnection();
  6.         $logger $this->_config->getSQLLogger();
  7.         if ($logger !== null) {
  8.             $logger->startQuery($sql$params$types);
  9.         }
  1.     {
  2.         $this->switchPersisterContext($offset$limit);
  3.         $sql              $this->getSelectSQL($criterianullnull$limit$offset$orderBy);
  4.         [$params$types] = $this->expandParameters($criteria);
  5.         $stmt             $this->conn->executeQuery($sql$params$types);
  6.         $hydrator $this->em->newHydrator($this->currentPersisterContext->selectJoinSql Query::HYDRATE_OBJECT Query::HYDRATE_SIMPLEOBJECT);
  7.         return $hydrator->hydrateAll($stmt$this->currentPersisterContext->rsm, [UnitOfWork::HINT_DEFEREAGERLOAD => true]);
  8.     }
  1.      */
  2.     public function findBy(array $criteria, ?array $orderBy null$limit null$offset null)
  3.     {
  4.         $persister $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
  5.         return $persister->loadAll($criteria$orderBy$limit$offset);
  6.     }
  7.     /**
  8.      * Finds a single entity by a set of criteria.
  9.      *
  1.          */
  2.         if ('findBy' === $constraint->repositoryMethod) {
  3.             $arguments = [$criterianull2];
  4.         }
  5.         $result $repository->{$constraint->repositoryMethod}(...$arguments);
  6.         if ($result instanceof \IteratorAggregate) {
  7.             $result $result->getIterator();
  8.         }
  1.             if ($value instanceof LazyProperty) {
  2.                 $value $value->getPropertyValue();
  3.             }
  4.             try {
  5.                 $validator->validate($value$constraint);
  6.             } catch (UnexpectedValueException $e) {
  7.                 $context->buildViolation('This value should be of type {{ type }}.')
  8.                     ->setParameter('{{ type }}'$e->getExpectedType())
  9.                     ->addViolation();
  10.             }
  1.                 unset($groups[$key]);
  2.                 continue;
  3.             }
  4.             $this->validateInGroup($object$cacheKey$metadata$group$context);
  5.         }
  6.         // If no more groups should be validated for the property nodes,
  7.         // we can safely quit
  8.         if (=== \count($groups)) {
  1.             if (!$classMetadata instanceof ClassMetadataInterface) {
  2.                 throw new UnsupportedMetadataException(sprintf('The metadata factory should return instances of "Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".'get_debug_type($classMetadata)));
  3.             }
  4.             $this->validateClassNode(
  5.                 $object,
  6.                 $this->generateCacheKey($object),
  7.                 $classMetadata,
  8.                 $propertyPath,
  9.                 $groups,
  1.         }
  2.         // If an object is passed without explicit constraints, validate that
  3.         // object against the constraints defined for the object's class
  4.         if (\is_object($value)) {
  5.             $this->validateObject(
  6.                 $value,
  7.                 $this->defaultPropertyPath,
  8.                 $groups,
  9.                 TraversalStrategy::IMPLICIT,
  10.                 $this->context
  1.                         break;
  2.                     }
  3.                 }
  4.             } else {
  5.                 if ($validateDataGraph) {
  6.                     $validator->atPath('data')->validate($datanull$groups);
  7.                 }
  8.                 $groupedConstraints = [];
  9.                 foreach ($constraints as $constraint) {
  1.             if ($value instanceof LazyProperty) {
  2.                 $value $value->getPropertyValue();
  3.             }
  4.             try {
  5.                 $validator->validate($value$constraint);
  6.             } catch (UnexpectedValueException $e) {
  7.                 $context->buildViolation('This value should be of type {{ type }}.')
  8.                     ->setParameter('{{ type }}'$e->getExpectedType())
  9.                     ->addViolation();
  10.             }
  1.                 unset($groups[$key]);
  2.                 continue;
  3.             }
  4.             $this->validateInGroup($object$cacheKey$metadata$group$context);
  5.         }
  6.         // If no more groups should be validated for the property nodes,
  7.         // we can safely quit
  8.         if (=== \count($groups)) {
  1.             if (!$classMetadata instanceof ClassMetadataInterface) {
  2.                 throw new UnsupportedMetadataException(sprintf('The metadata factory should return instances of "Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".'get_debug_type($classMetadata)));
  3.             }
  4.             $this->validateClassNode(
  5.                 $object,
  6.                 $this->generateCacheKey($object),
  7.                 $classMetadata,
  8.                 $propertyPath,
  9.                 $groups,
  1.         }
  2.         // If an object is passed without explicit constraints, validate that
  3.         // object against the constraints defined for the object's class
  4.         if (\is_object($value)) {
  5.             $this->validateObject(
  6.                 $value,
  7.                 $this->defaultPropertyPath,
  8.                 $groups,
  9.                 TraversalStrategy::IMPLICIT,
  10.                 $this->context
  1.     }
  2.     public function validate(mixed $valueConstraint|array $constraints nullstring|GroupSequence|array $groups null): ConstraintViolationListInterface
  3.     {
  4.         return $this->startContext($value)
  5.             ->validate($value$constraints$groups)
  6.             ->getViolations();
  7.     }
  8.     public function validateProperty(object $objectstring $propertyNamestring|GroupSequence|array $groups null): ConstraintViolationListInterface
  9.     {
  1.         return $this->validator->hasMetadataFor($value);
  2.     }
  3.     public function validate(mixed $valueConstraint|array $constraints nullstring|GroupSequence|array $groups null): ConstraintViolationListInterface
  4.     {
  5.         $violations $this->validator->validate($value$constraints$groups);
  6.         $trace debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS7);
  7.         $file $trace[0]['file'];
  8.         $line $trace[0]['line'];
  1.     {
  2.         $form $event->getForm();
  3.         if ($form->isRoot()) {
  4.             // Form groups are validated internally (FormValidator). Here we don't set groups as they are retrieved into the validator.
  5.             foreach ($this->validator->validate($form) as $violation) {
  6.                 // Allow the "invalid" constraint to be put onto
  7.                 // non-synchronized forms
  8.                 $allowNonSynchronized $violation->getConstraint() instanceof Form && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode();
  9.                 $this->violationMapper->mapViolation($violation$form$allowNonSynchronized);
  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.         $this->dispatcher $dispatcher;
  2.     }
  3.     public function dispatch(object $eventstring $eventName null): object
  4.     {
  5.         return $this->dispatcher->dispatch($event$eventName);
  6.     }
  7.     public function addListener(string $eventName, callable|array $listenerint $priority 0)
  8.     {
  9.         throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
in vendor/symfony/form/Form.php -> dispatch (line 591)
  1.         $this->normData $normData;
  2.         $this->viewData $viewData;
  3.         if ($dispatcher->hasListeners(FormEvents::POST_SUBMIT)) {
  4.             $event = new PostSubmitEvent($this$viewData);
  5.             $dispatcher->dispatch($eventFormEvents::POST_SUBMIT);
  6.         }
  7.         return $this;
  8.     }
  1.         // Don't auto-submit the form unless at least one field is present.
  2.         if ('' === $name && \count(array_intersect_key($data$form->all())) <= 0) {
  3.             return;
  4.         }
  5.         $form->submit($data'PATCH' !== $method);
  6.     }
  7.     public function isFileUpload(mixed $data): bool
  8.     {
  9.         return $data instanceof File;
in vendor/symfony/form/Form.php -> handleRequest (line 420)
  1.         return $this;
  2.     }
  3.     public function handleRequest(mixed $request null): static
  4.     {
  5.         $this->config->getRequestHandler()->handleRequest($this$request);
  6.         return $this;
  7.     }
  8.     public function submit(mixed $submittedDatabool $clearMissing true): static
Form->handleRequest() in src/Controller/RegistrationController.php (line 48)
  1.     */
  2.     public function register(Request $requestUserPasswordHasherInterface $userPasswordHasherEntityManagerInterface $entityManager): Response
  3.     {
  4.         $user = new UserEntity();
  5.         $form $this->createForm(RegistrationFormType::class, $user);
  6.         $form->handleRequest($request);
  7.         if ($form->isSubmitted() && $form->isValid()) {
  8.             // encode the plain password
  9.             $user->setPassword(
  10.                 $userPasswordHasher->hashPassword(
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $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.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/home/manager/simplexsms.com/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Doctrine\DBAL\Driver\PDO\ Exception

SQLSTATE[HY000] [2002] Connection refused

  1.         } else {
  2.             $code     $exception->getCode();
  3.             $sqlState null;
  4.         }
  5.         return new self($exception->getMessage(), $sqlState$code$exception);
  6.     }
  7. }
  1.                 $params['user'] ?? '',
  2.                 $params['password'] ?? '',
  3.                 $driverOptions,
  4.             );
  5.         } catch (PDOException $exception) {
  6.             throw Exception::new($exception);
  7.         }
  8.         return new Connection($pdo);
  9.     }
  1.      */
  2.     public function connect(
  3.         #[SensitiveParameter]
  4.         array $params
  5.     ) {
  6.         return $this->wrappedDriver->connect($params);
  7.     }
  8.     /**
  9.      * {@inheritDoc}
  10.      */
  1.         array $params
  2.     ) {
  3.         $this->logger->info('Connecting with parameters {params}', ['params' => $this->maskPassword($params)]);
  4.         return new Connection(
  5.             parent::connect($params),
  6.             $this->logger,
  7.         );
  8.     }
  9.     /**
  1.      */
  2.     public function connect(
  3.         #[SensitiveParameter]
  4.         array $params
  5.     ) {
  6.         return $this->wrappedDriver->connect($params);
  7.     }
  8.     /**
  9.      * {@inheritDoc}
  10.      */
  1.     }
  2.     public function connect(array $params): Connection
  3.     {
  4.         return new Connection(
  5.             parent::connect($params),
  6.             $this->debugDataHolder,
  7.             $this->stopwatch,
  8.             $this->connectionName,
  9.         );
  10.     }
  1.         if ($this->_conn !== null) {
  2.             return false;
  3.         }
  4.         try {
  5.             $this->_conn $this->_driver->connect($this->params);
  6.         } catch (Driver\Exception $e) {
  7.             throw $this->convertException($e);
  8.         }
  9.         if ($this->autoCommit === false) {
  1.             'https://github.com/doctrine/dbal/issues/4966',
  2.             'Connection::getWrappedConnection() is deprecated.'
  3.                 ' Use Connection::getNativeConnection() to access the native connection.',
  4.         );
  5.         $this->connect();
  6.         return $this->_conn;
  7.     }
  8.     /** @return resource|object */
in vendor/doctrine/dbal/src/Connection.php -> getWrappedConnection (line 1079)
  1.     ): Result {
  2.         if ($qcp !== null) {
  3.             return $this->executeCacheQuery($sql$params$types$qcp);
  4.         }
  5.         $connection $this->getWrappedConnection();
  6.         $logger $this->_config->getSQLLogger();
  7.         if ($logger !== null) {
  8.             $logger->startQuery($sql$params$types);
  9.         }
  1.     {
  2.         $this->switchPersisterContext($offset$limit);
  3.         $sql              $this->getSelectSQL($criterianullnull$limit$offset$orderBy);
  4.         [$params$types] = $this->expandParameters($criteria);
  5.         $stmt             $this->conn->executeQuery($sql$params$types);
  6.         $hydrator $this->em->newHydrator($this->currentPersisterContext->selectJoinSql Query::HYDRATE_OBJECT Query::HYDRATE_SIMPLEOBJECT);
  7.         return $hydrator->hydrateAll($stmt$this->currentPersisterContext->rsm, [UnitOfWork::HINT_DEFEREAGERLOAD => true]);
  8.     }
  1.      */
  2.     public function findBy(array $criteria, ?array $orderBy null$limit null$offset null)
  3.     {
  4.         $persister $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
  5.         return $persister->loadAll($criteria$orderBy$limit$offset);
  6.     }
  7.     /**
  8.      * Finds a single entity by a set of criteria.
  9.      *
  1.          */
  2.         if ('findBy' === $constraint->repositoryMethod) {
  3.             $arguments = [$criterianull2];
  4.         }
  5.         $result $repository->{$constraint->repositoryMethod}(...$arguments);
  6.         if ($result instanceof \IteratorAggregate) {
  7.             $result $result->getIterator();
  8.         }
  1.             if ($value instanceof LazyProperty) {
  2.                 $value $value->getPropertyValue();
  3.             }
  4.             try {
  5.                 $validator->validate($value$constraint);
  6.             } catch (UnexpectedValueException $e) {
  7.                 $context->buildViolation('This value should be of type {{ type }}.')
  8.                     ->setParameter('{{ type }}'$e->getExpectedType())
  9.                     ->addViolation();
  10.             }
  1.                 unset($groups[$key]);
  2.                 continue;
  3.             }
  4.             $this->validateInGroup($object$cacheKey$metadata$group$context);
  5.         }
  6.         // If no more groups should be validated for the property nodes,
  7.         // we can safely quit
  8.         if (=== \count($groups)) {
  1.             if (!$classMetadata instanceof ClassMetadataInterface) {
  2.                 throw new UnsupportedMetadataException(sprintf('The metadata factory should return instances of "Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".'get_debug_type($classMetadata)));
  3.             }
  4.             $this->validateClassNode(
  5.                 $object,
  6.                 $this->generateCacheKey($object),
  7.                 $classMetadata,
  8.                 $propertyPath,
  9.                 $groups,
  1.         }
  2.         // If an object is passed without explicit constraints, validate that
  3.         // object against the constraints defined for the object's class
  4.         if (\is_object($value)) {
  5.             $this->validateObject(
  6.                 $value,
  7.                 $this->defaultPropertyPath,
  8.                 $groups,
  9.                 TraversalStrategy::IMPLICIT,
  10.                 $this->context
  1.                         break;
  2.                     }
  3.                 }
  4.             } else {
  5.                 if ($validateDataGraph) {
  6.                     $validator->atPath('data')->validate($datanull$groups);
  7.                 }
  8.                 $groupedConstraints = [];
  9.                 foreach ($constraints as $constraint) {
  1.             if ($value instanceof LazyProperty) {
  2.                 $value $value->getPropertyValue();
  3.             }
  4.             try {
  5.                 $validator->validate($value$constraint);
  6.             } catch (UnexpectedValueException $e) {
  7.                 $context->buildViolation('This value should be of type {{ type }}.')
  8.                     ->setParameter('{{ type }}'$e->getExpectedType())
  9.                     ->addViolation();
  10.             }
  1.                 unset($groups[$key]);
  2.                 continue;
  3.             }
  4.             $this->validateInGroup($object$cacheKey$metadata$group$context);
  5.         }
  6.         // If no more groups should be validated for the property nodes,
  7.         // we can safely quit
  8.         if (=== \count($groups)) {
  1.             if (!$classMetadata instanceof ClassMetadataInterface) {
  2.                 throw new UnsupportedMetadataException(sprintf('The metadata factory should return instances of "Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".'get_debug_type($classMetadata)));
  3.             }
  4.             $this->validateClassNode(
  5.                 $object,
  6.                 $this->generateCacheKey($object),
  7.                 $classMetadata,
  8.                 $propertyPath,
  9.                 $groups,
  1.         }
  2.         // If an object is passed without explicit constraints, validate that
  3.         // object against the constraints defined for the object's class
  4.         if (\is_object($value)) {
  5.             $this->validateObject(
  6.                 $value,
  7.                 $this->defaultPropertyPath,
  8.                 $groups,
  9.                 TraversalStrategy::IMPLICIT,
  10.                 $this->context
  1.     }
  2.     public function validate(mixed $valueConstraint|array $constraints nullstring|GroupSequence|array $groups null): ConstraintViolationListInterface
  3.     {
  4.         return $this->startContext($value)
  5.             ->validate($value$constraints$groups)
  6.             ->getViolations();
  7.     }
  8.     public function validateProperty(object $objectstring $propertyNamestring|GroupSequence|array $groups null): ConstraintViolationListInterface
  9.     {
  1.         return $this->validator->hasMetadataFor($value);
  2.     }
  3.     public function validate(mixed $valueConstraint|array $constraints nullstring|GroupSequence|array $groups null): ConstraintViolationListInterface
  4.     {
  5.         $violations $this->validator->validate($value$constraints$groups);
  6.         $trace debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS7);
  7.         $file $trace[0]['file'];
  8.         $line $trace[0]['line'];
  1.     {
  2.         $form $event->getForm();
  3.         if ($form->isRoot()) {
  4.             // Form groups are validated internally (FormValidator). Here we don't set groups as they are retrieved into the validator.
  5.             foreach ($this->validator->validate($form) as $violation) {
  6.                 // Allow the "invalid" constraint to be put onto
  7.                 // non-synchronized forms
  8.                 $allowNonSynchronized $violation->getConstraint() instanceof Form && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode();
  9.                 $this->violationMapper->mapViolation($violation$form$allowNonSynchronized);
  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.         $this->dispatcher $dispatcher;
  2.     }
  3.     public function dispatch(object $eventstring $eventName null): object
  4.     {
  5.         return $this->dispatcher->dispatch($event$eventName);
  6.     }
  7.     public function addListener(string $eventName, callable|array $listenerint $priority 0)
  8.     {
  9.         throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
in vendor/symfony/form/Form.php -> dispatch (line 591)
  1.         $this->normData $normData;
  2.         $this->viewData $viewData;
  3.         if ($dispatcher->hasListeners(FormEvents::POST_SUBMIT)) {
  4.             $event = new PostSubmitEvent($this$viewData);
  5.             $dispatcher->dispatch($eventFormEvents::POST_SUBMIT);
  6.         }
  7.         return $this;
  8.     }
  1.         // Don't auto-submit the form unless at least one field is present.
  2.         if ('' === $name && \count(array_intersect_key($data$form->all())) <= 0) {
  3.             return;
  4.         }
  5.         $form->submit($data'PATCH' !== $method);
  6.     }
  7.     public function isFileUpload(mixed $data): bool
  8.     {
  9.         return $data instanceof File;
in vendor/symfony/form/Form.php -> handleRequest (line 420)
  1.         return $this;
  2.     }
  3.     public function handleRequest(mixed $request null): static
  4.     {
  5.         $this->config->getRequestHandler()->handleRequest($this$request);
  6.         return $this;
  7.     }
  8.     public function submit(mixed $submittedDatabool $clearMissing true): static
Form->handleRequest() in src/Controller/RegistrationController.php (line 48)
  1.     */
  2.     public function register(Request $requestUserPasswordHasherInterface $userPasswordHasherEntityManagerInterface $entityManager): Response
  3.     {
  4.         $user = new UserEntity();
  5.         $form $this->createForm(RegistrationFormType::class, $user);
  6.         $form->handleRequest($request);
  7.         if ($form->isSubmitted() && $form->isValid()) {
  8.             // encode the plain password
  9.             $user->setPassword(
  10.                 $userPasswordHasher->hashPassword(
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $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.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/home/manager/simplexsms.com/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

PDOException

SQLSTATE[HY000] [2002] Connection refused

  1.         $safeParams $params;
  2.         unset($safeParams['password'], $safeParams['url']);
  3.         try {
  4.             $pdo = new PDO(
  5.                 $this->constructPdoDsn($safeParams),
  6.                 $params['user'] ?? '',
  7.                 $params['password'] ?? '',
  8.                 $driverOptions,
  9.             );
  1.         $safeParams $params;
  2.         unset($safeParams['password'], $safeParams['url']);
  3.         try {
  4.             $pdo = new PDO(
  5.                 $this->constructPdoDsn($safeParams),
  6.                 $params['user'] ?? '',
  7.                 $params['password'] ?? '',
  8.                 $driverOptions,
  9.             );
  1.      */
  2.     public function connect(
  3.         #[SensitiveParameter]
  4.         array $params
  5.     ) {
  6.         return $this->wrappedDriver->connect($params);
  7.     }
  8.     /**
  9.      * {@inheritDoc}
  10.      */
  1.         array $params
  2.     ) {
  3.         $this->logger->info('Connecting with parameters {params}', ['params' => $this->maskPassword($params)]);
  4.         return new Connection(
  5.             parent::connect($params),
  6.             $this->logger,
  7.         );
  8.     }
  9.     /**
  1.      */
  2.     public function connect(
  3.         #[SensitiveParameter]
  4.         array $params
  5.     ) {
  6.         return $this->wrappedDriver->connect($params);
  7.     }
  8.     /**
  9.      * {@inheritDoc}
  10.      */
  1.     }
  2.     public function connect(array $params): Connection
  3.     {
  4.         return new Connection(
  5.             parent::connect($params),
  6.             $this->debugDataHolder,
  7.             $this->stopwatch,
  8.             $this->connectionName,
  9.         );
  10.     }
  1.         if ($this->_conn !== null) {
  2.             return false;
  3.         }
  4.         try {
  5.             $this->_conn $this->_driver->connect($this->params);
  6.         } catch (Driver\Exception $e) {
  7.             throw $this->convertException($e);
  8.         }
  9.         if ($this->autoCommit === false) {
  1.             'https://github.com/doctrine/dbal/issues/4966',
  2.             'Connection::getWrappedConnection() is deprecated.'
  3.                 ' Use Connection::getNativeConnection() to access the native connection.',
  4.         );
  5.         $this->connect();
  6.         return $this->_conn;
  7.     }
  8.     /** @return resource|object */
in vendor/doctrine/dbal/src/Connection.php -> getWrappedConnection (line 1079)
  1.     ): Result {
  2.         if ($qcp !== null) {
  3.             return $this->executeCacheQuery($sql$params$types$qcp);
  4.         }
  5.         $connection $this->getWrappedConnection();
  6.         $logger $this->_config->getSQLLogger();
  7.         if ($logger !== null) {
  8.             $logger->startQuery($sql$params$types);
  9.         }
  1.     {
  2.         $this->switchPersisterContext($offset$limit);
  3.         $sql              $this->getSelectSQL($criterianullnull$limit$offset$orderBy);
  4.         [$params$types] = $this->expandParameters($criteria);
  5.         $stmt             $this->conn->executeQuery($sql$params$types);
  6.         $hydrator $this->em->newHydrator($this->currentPersisterContext->selectJoinSql Query::HYDRATE_OBJECT Query::HYDRATE_SIMPLEOBJECT);
  7.         return $hydrator->hydrateAll($stmt$this->currentPersisterContext->rsm, [UnitOfWork::HINT_DEFEREAGERLOAD => true]);
  8.     }
  1.      */
  2.     public function findBy(array $criteria, ?array $orderBy null$limit null$offset null)
  3.     {
  4.         $persister $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
  5.         return $persister->loadAll($criteria$orderBy$limit$offset);
  6.     }
  7.     /**
  8.      * Finds a single entity by a set of criteria.
  9.      *
  1.          */
  2.         if ('findBy' === $constraint->repositoryMethod) {
  3.             $arguments = [$criterianull2];
  4.         }
  5.         $result $repository->{$constraint->repositoryMethod}(...$arguments);
  6.         if ($result instanceof \IteratorAggregate) {
  7.             $result $result->getIterator();
  8.         }
  1.             if ($value instanceof LazyProperty) {
  2.                 $value $value->getPropertyValue();
  3.             }
  4.             try {
  5.                 $validator->validate($value$constraint);
  6.             } catch (UnexpectedValueException $e) {
  7.                 $context->buildViolation('This value should be of type {{ type }}.')
  8.                     ->setParameter('{{ type }}'$e->getExpectedType())
  9.                     ->addViolation();
  10.             }
  1.                 unset($groups[$key]);
  2.                 continue;
  3.             }
  4.             $this->validateInGroup($object$cacheKey$metadata$group$context);
  5.         }
  6.         // If no more groups should be validated for the property nodes,
  7.         // we can safely quit
  8.         if (=== \count($groups)) {
  1.             if (!$classMetadata instanceof ClassMetadataInterface) {
  2.                 throw new UnsupportedMetadataException(sprintf('The metadata factory should return instances of "Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".'get_debug_type($classMetadata)));
  3.             }
  4.             $this->validateClassNode(
  5.                 $object,
  6.                 $this->generateCacheKey($object),
  7.                 $classMetadata,
  8.                 $propertyPath,
  9.                 $groups,
  1.         }
  2.         // If an object is passed without explicit constraints, validate that
  3.         // object against the constraints defined for the object's class
  4.         if (\is_object($value)) {
  5.             $this->validateObject(
  6.                 $value,
  7.                 $this->defaultPropertyPath,
  8.                 $groups,
  9.                 TraversalStrategy::IMPLICIT,
  10.                 $this->context
  1.                         break;
  2.                     }
  3.                 }
  4.             } else {
  5.                 if ($validateDataGraph) {
  6.                     $validator->atPath('data')->validate($datanull$groups);
  7.                 }
  8.                 $groupedConstraints = [];
  9.                 foreach ($constraints as $constraint) {
  1.             if ($value instanceof LazyProperty) {
  2.                 $value $value->getPropertyValue();
  3.             }
  4.             try {
  5.                 $validator->validate($value$constraint);
  6.             } catch (UnexpectedValueException $e) {
  7.                 $context->buildViolation('This value should be of type {{ type }}.')
  8.                     ->setParameter('{{ type }}'$e->getExpectedType())
  9.                     ->addViolation();
  10.             }
  1.                 unset($groups[$key]);
  2.                 continue;
  3.             }
  4.             $this->validateInGroup($object$cacheKey$metadata$group$context);
  5.         }
  6.         // If no more groups should be validated for the property nodes,
  7.         // we can safely quit
  8.         if (=== \count($groups)) {
  1.             if (!$classMetadata instanceof ClassMetadataInterface) {
  2.                 throw new UnsupportedMetadataException(sprintf('The metadata factory should return instances of "Symfony\Component\Validator\Mapping\ClassMetadataInterface", got: "%s".'get_debug_type($classMetadata)));
  3.             }
  4.             $this->validateClassNode(
  5.                 $object,
  6.                 $this->generateCacheKey($object),
  7.                 $classMetadata,
  8.                 $propertyPath,
  9.                 $groups,
  1.         }
  2.         // If an object is passed without explicit constraints, validate that
  3.         // object against the constraints defined for the object's class
  4.         if (\is_object($value)) {
  5.             $this->validateObject(
  6.                 $value,
  7.                 $this->defaultPropertyPath,
  8.                 $groups,
  9.                 TraversalStrategy::IMPLICIT,
  10.                 $this->context
  1.     }
  2.     public function validate(mixed $valueConstraint|array $constraints nullstring|GroupSequence|array $groups null): ConstraintViolationListInterface
  3.     {
  4.         return $this->startContext($value)
  5.             ->validate($value$constraints$groups)
  6.             ->getViolations();
  7.     }
  8.     public function validateProperty(object $objectstring $propertyNamestring|GroupSequence|array $groups null): ConstraintViolationListInterface
  9.     {
  1.         return $this->validator->hasMetadataFor($value);
  2.     }
  3.     public function validate(mixed $valueConstraint|array $constraints nullstring|GroupSequence|array $groups null): ConstraintViolationListInterface
  4.     {
  5.         $violations $this->validator->validate($value$constraints$groups);
  6.         $trace debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS7);
  7.         $file $trace[0]['file'];
  8.         $line $trace[0]['line'];
  1.     {
  2.         $form $event->getForm();
  3.         if ($form->isRoot()) {
  4.             // Form groups are validated internally (FormValidator). Here we don't set groups as they are retrieved into the validator.
  5.             foreach ($this->validator->validate($form) as $violation) {
  6.                 // Allow the "invalid" constraint to be put onto
  7.                 // non-synchronized forms
  8.                 $allowNonSynchronized $violation->getConstraint() instanceof Form && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode();
  9.                 $this->violationMapper->mapViolation($violation$form$allowNonSynchronized);
  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.         $this->dispatcher $dispatcher;
  2.     }
  3.     public function dispatch(object $eventstring $eventName null): object
  4.     {
  5.         return $this->dispatcher->dispatch($event$eventName);
  6.     }
  7.     public function addListener(string $eventName, callable|array $listenerint $priority 0)
  8.     {
  9.         throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
in vendor/symfony/form/Form.php -> dispatch (line 591)
  1.         $this->normData $normData;
  2.         $this->viewData $viewData;
  3.         if ($dispatcher->hasListeners(FormEvents::POST_SUBMIT)) {
  4.             $event = new PostSubmitEvent($this$viewData);
  5.             $dispatcher->dispatch($eventFormEvents::POST_SUBMIT);
  6.         }
  7.         return $this;
  8.     }
  1.         // Don't auto-submit the form unless at least one field is present.
  2.         if ('' === $name && \count(array_intersect_key($data$form->all())) <= 0) {
  3.             return;
  4.         }
  5.         $form->submit($data'PATCH' !== $method);
  6.     }
  7.     public function isFileUpload(mixed $data): bool
  8.     {
  9.         return $data instanceof File;
in vendor/symfony/form/Form.php -> handleRequest (line 420)
  1.         return $this;
  2.     }
  3.     public function handleRequest(mixed $request null): static
  4.     {
  5.         $this->config->getRequestHandler()->handleRequest($this$request);
  6.         return $this;
  7.     }
  8.     public function submit(mixed $submittedDatabool $clearMissing true): static
Form->handleRequest() in src/Controller/RegistrationController.php (line 48)
  1.     */
  2.     public function register(Request $requestUserPasswordHasherInterface $userPasswordHasherEntityManagerInterface $entityManager): Response
  3.     {
  4.         $user = new UserEntity();
  5.         $form $this->createForm(RegistrationFormType::class, $user);
  6.         $form->handleRequest($request);
  7.         if ($form->isSubmitted() && $form->isValid()) {
  8.             // encode the plain password
  9.             $user->setPassword(
  10.                 $userPasswordHasher->hashPassword(
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $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.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/home/manager/simplexsms.com/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };