Exceptions
Exception
Symfony\Component\Form\Exception\ LogicException
in
vendor/symfony/form/Form.php
(line 765)
* {@inheritdoc}
*/
public function isValid()
{
if (!$this->submitted) {
throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().');
}
if ($this->isDisabled()) {
return true;
}
in
vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php
->
isValid
(line 120)
*/
public function getCredentials(Request $request)
{
$form = $this->createForm(LoginType::class);
$form->handleRequest($request);
if (!$form->isValid()) {
$this->error = $this->getErrors($form);
}
$credentials = $form->getData();
in
vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php
->
getCredentials
(line 148)
if (null !== $this->logger) {
$this->logger->debug('Calling getCredentials() on guard authenticator.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]);
}
// allow the authenticator to fetch authentication info from the request
$credentials = $guardAuthenticator->getCredentials($request);
if (null === $credentials) {
throw new \UnexpectedValueException(sprintf('The return value of "%1$s::getCredentials()" must not be null. Return false from "%1$s::supports()" instead.', get_debug_type($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 Trace
LogicException
|
---|
Symfony\Component\Form\Exception\LogicException: Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid(). at vendor/symfony/form/Form.php:765 at Symfony\Component\Form\Form->isValid() (vendor/kematjaya/user-bundle/src/Security/KmjLoginAuthenticator.php:120) at Kematjaya\UserBundle\Security\KmjLoginAuthenticator->getCredentials() (vendor/symfony/security-guard/Firewall/GuardAuthenticationListener.php:148) 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) |