Error 500 Internal Server Error

GET https://base.mtkr.tech/creer-un-compte

Forwarded to ErrorController (3b97a7)

Exceptions

InvalidArgumentException

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

HTTP 500 Internal Server Error

Stack Trace

* @param string[]|null $groups
*/
public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, mixed $payload = null)
{
if (null !== $options) {
throw new InvalidArgumentException(\sprintf('Passing an array of options to configure the "%s" constraint is no longer supported.', static::class));
}
parent::__construct(null, $groups, $payload);
$this->message = $message ?? $this->message;
IsTrue->__construct(array('message' => 'You should agree to our terms.')) in src/Form/RegistrationFormType.php (line 24)
$builder
->add('email')
->add('agreeTerms', CheckboxType::class, [
'mapped' => false,
'constraints' => [
new IsTrue([
'message' => 'You should agree to our terms.',
]),
],
])
->add('plainPassword', PasswordType::class, [
RegistrationFormType->buildForm(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, 'allow_array_submission' => 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' => 'App\\Entity\\User', 'empty_data' => Closure, 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => 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' => SameOriginCsrfTokenManager, 'csrf_token_id' => null, 'data' => User)) in vendor/symfony/form/ResolvedFormType.php (line 100)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$this->parent?->buildForm($builder, $options);
$this->innerType->buildForm($builder, $options);
foreach ($this->typeExtensions as $extension) {
$extension->buildForm($builder, $options);
}
}
ResolvedFormType->buildForm(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, 'allow_array_submission' => 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' => 'App\\Entity\\User', 'empty_data' => Closure, 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => 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' => SameOriginCsrfTokenManager, 'csrf_token_id' => null, 'data' => User)) in vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php (line 73)
return $this->proxiedType->createView($form, $parent);
}
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$this->proxiedType->buildForm($builder, $options);
}
public function buildView(FormView $view, FormInterface $form, array $options): void
{
$this->proxiedType->buildView($view, $form, $options);
ResolvedTypeDataCollectorProxy->buildForm(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, 'allow_array_submission' => 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' => 'App\\Entity\\User', 'empty_data' => Closure, 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => 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' => SameOriginCsrfTokenManager, 'csrf_token_id' => null, 'data' => User)) in vendor/symfony/form/FormFactory.php (line 85)
$builder->setInitialOptions($options);
}
// Explicitly call buildForm() in order to be able to override either
// createBuilder() or buildForm() in the resolved form type
$type->buildForm($builder, $builder->getOptions());
return $builder;
}
public function createBuilderForProperty(string $class, string $property, mixed $data = null, array $options = []): FormBuilderInterface
FormFactory->createNamedBuilder('registration_form', ResolvedTypeDataCollectorProxy, User, array('data' => User)) in vendor/symfony/form/FormFactory.php (line 63)
/**
* @return ($type is class-string<FormFlowTypeInterface> ? FormFlowBuilderInterface : FormBuilderInterface)
*/
public function createBuilder(string $type = FormType::class, mixed $data = null, array $options = []): FormBuilderInterface
{
return $this->createNamedBuilder($this->registry->getType($type)->getBlockPrefix(), $type, $data, $options);
}
/**
* @return ($type is class-string<FormFlowTypeInterface> ? FormFlowBuilderInterface : FormBuilderInterface)
*/
FormFactory->createBuilder('App\\Form\\RegistrationFormType', User, array()) in vendor/symfony/form/FormFactory.php (line 42)
/**
* @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
*/
public function create(string $type = FormType::class, mixed $data = null, array $options = []): FormInterface
{
return $this->createBuilder($type, $data, $options)->getForm();
}
/**
* @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
*/
FormFactory->create('App\\Form\\RegistrationFormType', User, array()) in vendor/symfony/framework-bundle/Controller/AbstractController.php (line 356)
*
* @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
*/
protected function createForm(string $type, mixed $data = null, array $options = []): FormInterface
{
return $this->container->get('form.factory')->create($type, $data, $options);
}
/**
* Creates and returns a form builder instance.
*/
AbstractController->createForm('App\\Form\\RegistrationFormType', User) in src/Controller/RegistrationController.php (line 34)
#[Route('/creer-un-compte', name: 'app_register')]
public function register(Request $request, UserPasswordHasherInterface $userPasswordHasher, UserAuthenticatorInterface $userAuthenticator, LoginAuthenticator $authenticator, EntityManagerInterface $entityManager): Response
{
$user = new User();
$form = $this->createForm(RegistrationFormType::class, $user);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
// encode the plain password
$user->setPassword(
RegistrationController->register(Request, UserPasswordHasher, UserAuthenticator, LoginAuthenticator, EntityManager) in vendor/symfony/http-kernel/HttpKernel.php (line 200)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response, $controllerMetadata);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
HttpKernel->handleRaw(Request, 1, ControllerArgumentsMetadata) in vendor/symfony/http-kernel/HttpKernel.php (line 80)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
$response = null;
try {
return $response = $this->handleRaw($request, $type, $controllerMetadata);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
HttpKernel->handle(Request, 1, true) in vendor/symfony/http-kernel/Kernel.php (line 156)
if (!$this->handlingHttpCache) {
$this->resetServices = true;
}
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
) {
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send(false);
if (\function_exists('fastcgi_finish_request') && !$this->debug) {
fastcgi_finish_request();
HttpKernelRunner->run() in vendor/autoload_runtime.php (line 32)
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
require_once('/var/www/html/vendor/autoload_runtime.php') in public/index.php (line 5)
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};