title: Symfony 3.4 ldap authentication issue
body: <p>I am trying to authenticate users through ldap (window active directory) with Symfony 3.4 and i use this <a href="https://symfony.com/doc/3.4/security/ldap.html" rel="nofollow noreferrer">documentation</a> </p>
  
  <p>Please, Help Me!!!!</p>
  
  <p>But I'm getting error:</p>
  
  <blockquote>
    <p>php.DEBUG: Warning: ldap_bind(): Unable to bind to server: Invalid credentials {"exception":"[object] (Symfony\Component\Debug\Exception\SilencedErrorContext: {\"severity\":2,\"file\":\"C:\\OSPanel\\domains\\warcsymfony\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Ldap\\Adapter\\ExtLdap\\Connection.php\",\"line\":53,\"trace\":[{\"file\":\"C:\\OSPanel\\domains\\warcsymfony\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Ldap\\Ldap.php\",\"line\":38,\"function\":\"bind\",\"class\":\"Symfony\\Component\\Ldap\\Adapter\\ExtLdap\\Connection\",\"type\":\"->\"}],\"count\":1})"} []
    [2018-03-14 10:27:03] security.INFO: Authentication request failed. {"exception":"[object] (Symfony\Component\Security\Core\Exception\BadCredentialsException(code: 0): Bad credentials. at C:\OSPanel\domains\warcsymfony\vendor\symfony\symfony\src\Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider.php:71, Symfony\Component\Security\Core\Exception\UsernameNotFoundException(code: 0): User \"testusername\" not found. at C:\OSPanel\domains\warcsymfony\vendor\symfony\symfony\src\Symfony\Component\Security\Core\User\LdapUserProvider.php:75, Symfony\Component\Ldap\Exception\ConnectionException(code: 0): Invalid credentials at C:\OSPanel\domains\warcsymfony\vendor\symfony\symfony\src\Symfony\Component\Ldap\Adapter\ExtLdap\Connection.php:54)"} []
    [2018-03-14 10:27:03] security.DEBUG: Authentication failure, redirect triggered. {"failure_path":"login"} []</p>
  </blockquote>
  
  <p>I tried change in parameters, but it did not work</p>
  
  <pre><code>security.yml
  
  security:
  
    providers:
      my_ldap:
          ldap:
              service: Symfony\Component\Ldap\Ldap
              base_dn: DC=example,DC=com
              search_dn: 'OU=all-users-accounts,DC=example,DC=com'
              search_password: password
              default_roles: ROLE_USER
              uid_key: sAMAccountName
  firewalls:
      dev:
          pattern: ^/(_(profiler|wdt)|css|images|js)/
          security: false
      main:
          pattern: ^/
          anonymous: ~
          form_login_ldap:
              login_path: login
              check_path: login
              service: Symfony\Component\Ldap\Ldap
              dn_string: 'sAMAccountName={username},DC=example,DC=com'
  
  service.yml
  services:
      Symfony\Component\Ldap\Ldap:
          arguments: ['@Symfony\Component\Ldap\Adapter\ExtLdap\Adapter']
      Symfony\Component\Ldap\Adapter\ExtLdap\Adapter:
          arguments:
              -   host: **.**.**.**
                  port: 389
                  encryption: 'none'
                  options:
                      protocol_version: 3
                      referrals: false
  </code></pre>
  
  <p>SecurityController</p>
  
  <pre><code> /**
   * @Route("/login", name="login")
   */
  public function loginAction(Request $request, AuthenticationUtils $authenticationUtils){
  
      $error  = $authenticationUtils-&gt;getLastAuthenticationError();
  
      $username = $authenticationUtils-&gt;getLastUsername();
  
      return $this-&gt;render('security/login.html.twig', array(
          'last_username' =&gt; $username,
          'error' =&gt; $error
          ));
  }
  </code></pre>