[Form] [Component] Add support for an initial form value

by @Bossman1337

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/46336/daf14f98652a321b17485aac9a094c8ba8c01564/cs.diff | patch -p0
diff -ru src/Symfony/Component/Form/Extension/Core/EventListener/InitFormValueListener.php src/Symfony/Component/Form/Extension/Core/EventListener/InitFormValueListener.php
--- src/Symfony/Component/Form/Extension/Core/EventListener/InitFormValueListener.php	2022-05-14 09:33:58.591977527 +0000
+++ src/Symfony/Component/Form/Extension/Core/EventListener/InitFormValueListener.php	2022-05-14 09:33:59.232990935 +0000
@@ -1,4 +1,5 @@
 <?php
+
 /*
  * This file is part of the Symfony package.
  *
@@ -32,4 +33,4 @@
     {
         return [FormEvents::PRE_SET_DATA => 'onPreSetData'];
     }
-}
\ No newline at end of file
+}
diff -ru src/Symfony/Component/Form/Extension/Core/Type/FormType.php src/Symfony/Component/Form/Extension/Core/Type/FormType.php
--- src/Symfony/Component/Form/Extension/Core/Type/FormType.php	2022-05-14 09:33:58.770981271 +0000
+++ src/Symfony/Component/Form/Extension/Core/Type/FormType.php	2022-05-14 09:34:00.334013965 +0000
@@ -16,8 +16,8 @@
 use Symfony\Component\Form\Extension\Core\DataAccessor\ChainAccessor;
 use Symfony\Component\Form\Extension\Core\DataAccessor\PropertyPathAccessor;
 use Symfony\Component\Form\Extension\Core\DataMapper\DataMapper;
-use Symfony\Component\Form\Extension\Core\EventListener\TrimListener;
 use Symfony\Component\Form\Extension\Core\EventListener\InitFormValueListener;
+use Symfony\Component\Form\Extension\Core\EventListener\TrimListener;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\Form\FormInterface;
 use Symfony\Component\Form\FormView;

0
Common Typos

0
License Headers

0
Pull Request Contributor Headers

0
File Permissions

0
Merge Commits

0
Exception Messages Formatting

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages