title: Catchable Fatal Error: Argument 4 passed to UsernamePasswordToken::__construct() must be an array, null given
body: <p>I am getting the following error when logging in into my Symfony application (with correct username and password):</p>
  
  <blockquote>
    <p>ContextErrorException: Catchable Fatal Error: Argument 4 passed to Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken::__construct() must be an array, null given, called in D:\xampp\htdocs\essweb\vendor\symfony\symfony\src\Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider.php on line 96 and defined in D:\xampp\htdocs\essweb\vendor\symfony\symfony\src\Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken.php line 36</p>
  </blockquote>
  
  <p><strong>Security.yml</strong></p>
  
  <pre><code>firewalls:
          admin_area:
              pattern:    ^/
              anonymous: ~
              form_login:
                  login_path:  /
                  check_path:  /login_check
                  default_target_path: /user
                  failure_path: /
                  #username_parameter: username
                  #password_parameter: password
                  remember_me: true
  
              remember_me:
                  key: "%secret%"
                  lifetime: 31536000
                  path: /
                  domain: ~
                  always_remember_me: true
              logout:
                  path:   /logout
                  target: /  
  </code></pre>
  
  <p>Updated:</p>
  
  <p><strong>Login form:</strong></p>
  
  <pre><code>&lt;form class="form-signin form-group" action="{{ path('login_check') }}" method="post"&gt;
  Username: &lt;input type="text" class="form-control" name="_username" placeholder="Username" value="{{ last_username }}" required="required"&gt;
  Password: &lt;input type="text" class="form-control" name="_password" placeholder="" value="{{ last_username }}" required="required"&gt;
  &lt;button class="btn btn-sm btn-primary btn-block" type="submit"&gt;Sign in&lt;/button&gt;
  </code></pre>