title: An error has occurred resolving the options of the form "Symfony\Component\Form\Extension\Core\Type\PasswordType": The options "0", "1" do not exist
body: <p>I just started learning symfony framework, and I got an error.</p>
  <blockquote>
  <p>An error has occurred resolving the options of the form &quot;Symfony\Component\Form\Extension\Core\Type\PasswordType&quot;: The options &quot;0&quot;, &quot;1&quot; do not exist. Defined options are: &quot;action&quot;, &quot;allow_extra_fields&quot;, &quot;allow_file_upload&quot;, &quot;always_empty&quot;, &quot;attr&quot;, &quot;attr_translation_parameters&quot;, &quot;auto_initialize&quot;, &quot;block_name&quot;, &quot;block_prefix&quot;, &quot;by_reference&quot;, &quot;compound&quot;, &quot;constraints&quot;, &quot;csrf_field_name&quot;, &quot;csrf_message&quot;, &quot;csrf_protection&quot;, &quot;csrf_token_id&quot;, &quot;csrf_token_manager&quot;, &quot;data&quot;, &quot;data_class&quot;, &quot;disabled&quot;, &quot;empty_data&quot;, &quot;error_bubbling&quot;, &quot;error_mapping&quot;, &quot;extra_fields_message&quot;, &quot;help&quot;, &quot;help_attr&quot;, &quot;help_html&quot;, &quot;help_translation_parameters&quot;, &quot;inherit_data&quot;, &quot;invalid_message&quot;, &quot;invalid_message_parameters&quot;, &quot;is_empty_callback&quot;, &quot;label&quot;, &quot;label_attr&quot;, &quot;label_format&quot;, &quot;label_html&quot;, &quot;label_translation_parameters&quot;, &quot;mapped&quot;, &quot;method&quot;, &quot;post_max_size_message&quot;, &quot;property_path&quot;, &quot;required&quot;, &quot;row_attr&quot;, &quot;translation_domain&quot;, &quot;trim&quot;, &quot;upload_max_size_message&quot;, &quot;validation_groups&quot;.</p>
  </blockquote>
  <p>I didn't even set 0 or 1 anywhere. The error occurs when trying to visit <a href="https://127.0.0.1:8000/register" rel="nofollow noreferrer">https://127.0.0.1:8000/register</a>.
  My code registration controller is</p>
  <pre><code>    &lt;?php
  
  namespace App\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  use Symfony\Component\Form\Extension\Core\Type\PasswordType;
  use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
  use Symfony\Component\Routing\Annotation\Route;
  
  class RegistrationController extends AbstractController
  {
      /**
       * @Route(&quot;/register&quot;, name=&quot;register&quot;)
       */
      public function register()
      {
  
          $form = $this-&gt;createFormBuilder()
              -&gt;add('username')
              -&gt;add('password', RepeatedType::class,[
                  'type' =&gt; PasswordType::class,
                  'required' =&gt; true,
                  'first_options' =&gt; ['label','Password'],
                  'second_options' =&gt; ['label','Confirm Password']
              ])
              -&gt;getForm();
          return $this-&gt;render('registration/index.html.twig', [
              'form' =&gt; $form-&gt;createView()
          ]);
      }
  }
  </code></pre>
  <p>I've been following symfony tutorial on youtube and he doesn't get an error.
  What can I do? Thanks</p>
  <p><strong>Edit</strong>
  I had an error in 'first_options' and 'second_options'
  The right way was
  'first_options' =&gt; ['label' =&gt; 'Password'],
  'second_options' =&gt; ['label' =&gt;'Confirm Password']</p>