Error 500 Internal Server Error

GET https://dev.ekhopsychology.se/hu/user/login/phone/request

Exceptions

Passing an array of options to configure the "Symfony\Component\Validator\Constraints\NotBlank" constraint is no longer supported.

Exception

Symfony\Component\Validator\Exception\ InvalidArgumentException

  1. * @param string[]|null $groups
  2. */
  3. public function __construct(?array $options = null, ?string $message = null, ?bool $allowNull = null, ?callable $normalizer = null, ?array $groups = null, mixed $payload = null)
  4. {
  5. if (null !== $options) {
  6. throw new InvalidArgumentException(\sprintf('Passing an array of options to configure the "%s" constraint is no longer supported.', static::class));
  7. }
  8. parent::__construct(null, $groups, $payload);
  9. $this->message = $message ?? $this->message;
NotBlank->__construct() in src/Form/PhoneLoginRequestFormType.php (line 28)
  1. 'placeholder' => 'form.phone.placeholder',
  2. 'autocomplete' => 'tel',
  3. 'class' => 'form-control form-control-lg',
  4. ],
  5. 'constraints' => [
  6. new NotBlank([
  7. 'message' => 'validation.phone.not_blank',
  8. ]),
  9. new Regex([
  10. 'pattern' => '/^\+[1-9]\d{1,14}$/',
  11. 'message' => 'validation.phone.invalid_format',
  1. public function buildForm(FormBuilderInterface $builder, array $options): void
  2. {
  3. $this->parent?->buildForm($builder, $options);
  4. $this->innerType->buildForm($builder, $options);
  5. foreach ($this->typeExtensions as $extension) {
  6. $extension->buildForm($builder, $options);
  7. }
  8. }
  1. return $this->proxiedType->createView($form, $parent);
  2. }
  3. public function buildForm(FormBuilderInterface $builder, array $options): void
  4. {
  5. $this->proxiedType->buildForm($builder, $options);
  6. }
  7. public function buildView(FormView $view, FormInterface $form, array $options): void
  8. {
  9. $this->proxiedType->buildView($view, $form, $options);
in vendor/symfony/form/FormFactory.php -> buildForm (line 75)
  1. $builder->setInitialOptions($options);
  2. }
  3. // Explicitly call buildForm() in order to be able to override either
  4. // createBuilder() or buildForm() in the resolved form type
  5. $type->buildForm($builder, $builder->getOptions());
  6. return $builder;
  7. }
  8. public function createBuilderForProperty(string $class, string $property, mixed $data = null, array $options = []): FormBuilderInterface
in vendor/symfony/form/FormFactory.php -> createNamedBuilder (line 53)
  1. /**
  2. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowBuilderInterface : FormBuilderInterface)
  3. */
  4. public function createBuilder(string $type = FormType::class, mixed $data = null, array $options = []): FormBuilderInterface
  5. {
  6. return $this->createNamedBuilder($this->registry->getType($type)->getBlockPrefix(), $type, $data, $options);
  7. }
  8. /**
  9. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowBuilderInterface : FormBuilderInterface)
  10. */
in vendor/symfony/form/FormFactory.php -> createBuilder (line 32)
  1. /**
  2. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
  3. */
  4. public function create(string $type = FormType::class, mixed $data = null, array $options = []): FormInterface
  5. {
  6. return $this->createBuilder($type, $data, $options)->getForm();
  7. }
  8. /**
  9. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
  10. */
  1. *
  2. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
  3. */
  4. protected function createForm(string $type, mixed $data = null, array $options = []): FormInterface
  5. {
  6. return $this->container->get('form.factory')->create($type, $data, $options);
  7. }
  8. /**
  9. * Creates and returns a form builder instance.
  10. */
AbstractController->createForm() in src/Controller/PhoneLoginController.php (line 47)
  1. // Already logged in? Redirect to dashboard
  2. if ($this->getUser()) {
  3. return $this->redirectToUserDashboard($userType, $request->getLocale());
  4. }
  5. $form = $this->createForm(PhoneLoginRequestFormType::class);
  6. $form->handleRequest($request);
  7. if ($form->isSubmitted() && $form->isValid()) {
  8. $phone = $form->get('phone')->getData();
  1. $this->dispatcher->dispatch($event, KernelEvents::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($event, KernelEvents::VIEW);
  1. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2. $this->requestStack->push($request);
  3. $response = null;
  4. try {
  5. return $response = $this->handleRaw($request, $type);
  6. } catch (\Throwable $e) {
  7. if ($e instanceof \Error && !$this->handleAllThrowables) {
  8. throw $e;
  9. }
  1. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. if (Kernel::VERSION_ID >= 60400) {
  7. $response->send(false);
  8. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 32)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/home/vujdv/domains/ekhopsychology_dev/vendor/autoload_runtime.php') in public_html/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. };

Logs

Level Channel Message
INFO 15:26:03 app All required environment variables are present
INFO 15:26:03 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "299f66"
    },
    "request_uri": "https://dev.ekhopsychology.se/_profiler/299f66",
    "method": "GET"
}

Stack Trace

InvalidArgumentException
Symfony\Component\Validator\Exception\InvalidArgumentException:
Passing an array of options to configure the "Symfony\Component\Validator\Constraints\NotBlank" constraint is no longer supported.

  at vendor/symfony/validator/Constraints/NotBlank.php:44
  at Symfony\Component\Validator\Constraints\NotBlank->__construct()
     (src/Form/PhoneLoginRequestFormType.php:28)
  at App\Form\PhoneLoginRequestFormType->buildForm()
     (vendor/symfony/form/ResolvedFormType.php:100)
  at Symfony\Component\Form\ResolvedFormType->buildForm()
     (vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php:73)
  at Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy->buildForm()
     (vendor/symfony/form/FormFactory.php:75)
  at Symfony\Component\Form\FormFactory->createNamedBuilder()
     (vendor/symfony/form/FormFactory.php:53)
  at Symfony\Component\Form\FormFactory->createBuilder()
     (vendor/symfony/form/FormFactory.php:32)
  at Symfony\Component\Form\FormFactory->create()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:354)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->createForm()
     (src/Controller/PhoneLoginController.php:47)
  at App\Controller\PhoneLoginController->request()
     (vendor/symfony/http-kernel/HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:191)
  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:32)
  at require_once('/home/vujdv/domains/ekhopsychology_dev/vendor/autoload_runtime.php')
     (public_html/index.php:5)