Exceptions
Exception
Doctrine\Common\Cache\Psr6\ InvalidArgument
in
src/Controller/RegisterController.php
(line 157)
private function getUserByUsername(string $username): UserInterface{$user = $this->userRepository->findOneBy(['username'=>$username]);if (!$user) {throw new InvalidArgument('Invalid Request! Something went wrong and could not process your request');}return $user;}private function getUserEntity(array $data)
{$username = $request->get('username');if(!$username){throw new AppException(400, 'Invalid Request! The resource you are accessing is invalid');}$user = $this->getUserByUsername($username);//dump($user);return $this->render('app/register_success.html.twig',['email' => $user->getEmail(),'pageTitle' => "Thank you for registring"]);
in
vendor/symfony/http-kernel/HttpKernel.php
->
success
(line 163)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
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;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
$this->request = $request;}public function run(): int{$response = $this->kernel->handle($this->request);$response->send();if ($this->kernel instanceof TerminableInterface) {$this->kernel->terminate($this->request, $response);}
in
vendor/autoload_runtime.php
->
run
(line 29)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
require_once('/var/www/vhosts/istammergh.org/consoleFiles/vendor/autoload_runtime.php')
in
/var/www/vhosts/istammergh.org/app.istammergh.org/index.php
(line 6)
<?phpuse App\Kernel;require_once dirname(__DIR__).'/consoleFiles/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Stack Trace
|
InvalidArgument
|
|---|
Doctrine\Common\Cache\Psr6\InvalidArgument:
Invalid Request! Something went wrong and could not process your request
at src/Controller/RegisterController.php:157
at App\Controller\RegisterController->getUserByUsername()
(src/Controller/RegisterController.php:79)
at App\Controller\RegisterController->success()
(vendor/symfony/http-kernel/HttpKernel.php:163)
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()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:29)
at require_once('/var/www/vhosts/istammergh.org/consoleFiles/vendor/autoload_runtime.php')
(/var/www/vhosts/istammergh.org/app.istammergh.org/index.php:6)
|