Error 500 Internal Server Error

GET https://itrsp.giobtrans.ch/reset-password

Forwarded to ErrorController (91c145)

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(array('message' => 'Entrez votre nom d\'utilisateur')) in src/Form/ResetPasswordRequestFormType.php (line 24)
  1. 'attr' => [
  2. 'class' => 'form-control form-control-lg form-control-alt',
  3. 'placeholder' => 'Votre nom d\'utilisateur',
  4. ],
  5. 'constraints' => [
  6. new NotBlank([
  7. 'message' => 'Entrez votre nom d\'utilisateur',
  8. ]),
  9. ],
  10. ])
  11. ;
  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('App\\Form\\ResetPasswordRequestFormType') in src/Controller/ResetPasswordController.php (line 39)
  1. * Display & process form to request a password reset.
  2. */
  3. #[Route(path: '', name: 'app_forgot_password_request')]
  4. public function request(Request $request, MailerInterface $mailer): Response
  5. {
  6. $form = $this->createForm(ResetPasswordRequestFormType::class);
  7. $form->handleRequest($request);
  8. if ($form->isSubmitted() && $form->isValid()) {
  9. return $this->processSendingPasswordResetUsername(
  10. $form->get('username')->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. }
Kernel->handle(object(Request)) in public/index.php (line 28)
  1. Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request = Request::createFromGlobals();
  5. $response = $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request, $response);

Logs

Level Channel Message
INFO 08:10:07 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "0bf552"
    },
    "request_uri": "https://itrsp.giobtrans.ch/_profiler/0bf552?panel=exception&type=request",
    "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(array('message' => 'Entrez votre nom d\'utilisateur'))
     (src/Form/ResetPasswordRequestFormType.php:24)
  at App\Form\ResetPasswordRequestFormType->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'block_prefix' => null, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => null, 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(SameOriginCsrfTokenManager), 'csrf_token_id' => null))
     (vendor/symfony/form/ResolvedFormType.php:100)
  at Symfony\Component\Form\ResolvedFormType->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'block_prefix' => null, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => null, 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(SameOriginCsrfTokenManager), 'csrf_token_id' => null))
     (vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php:73)
  at Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy->buildForm(object(FormBuilder), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'block_prefix' => null, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => null, 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(SameOriginCsrfTokenManager), 'csrf_token_id' => null))
     (vendor/symfony/form/FormFactory.php:75)
  at Symfony\Component\Form\FormFactory->createNamedBuilder('reset_password_request_form', object(ResolvedTypeDataCollectorProxy), null, array())
     (vendor/symfony/form/FormFactory.php:53)
  at Symfony\Component\Form\FormFactory->createBuilder('App\\Form\\ResetPasswordRequestFormType', null, array())
     (vendor/symfony/form/FormFactory.php:32)
  at Symfony\Component\Form\FormFactory->create('App\\Form\\ResetPasswordRequestFormType', null, array())
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:354)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->createForm('App\\Form\\ResetPasswordRequestFormType')
     (src/Controller/ResetPasswordController.php:39)
  at App\Controller\ResetPasswordController->request(object(Request), object(Mailer))
     (vendor/symfony/http-kernel/HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:191)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:28)