title: Symfony 3 with ldapClient error User Warning: Expected known_string to be a string, NULL given
body: <p>I have an error when authenticating my LDAP<br>
  I use fos userbundle<br>
  My user is find but when compare password <br></p>
  
  <h2>My config files :</h2>
  
  <p><strong><code>security.yml</code></strong></p>
  
  <pre><code>providers:
      fos_userbundle:
          id: fos_user.user_provider.username
  
      users_ldap:
          ldap:
              service: ldap
              base_dn: "OU=USERS,DC=domain,DC=be"
              search_dn: "CN=ps,OU=apps,DC=domain,DC=be"
              search_password: password
              default_roles: ROLE_USER
              uid_key: sAMAccountName
      chain_provider:
          chain :
              providers: [users_ldap, fos_userbundle]
  
  encoders:
      Symfony\Component\Security\Core\User\User: plaintext
      AcSecurityBundle\Entity\User: sha512
  
  firewalls:        
  
      secured_area:
          pattern:    ^/
          anonymous: true
          provider: chain_provider
          form_login:
              csrf_token_generator: security.csrf.token_manager
              use_referer: true
          form_login_ldap:
              service: ldap
              use_referer: true
          logout: true
  </code></pre>
  
  <p><strong><code>service.yml</code></strong></p>
  
  <pre><code>services:
  ldap:
      class: 'Symfony\Component\Ldap\LdapClient'
      arguments:
          - ldap.domain.be   # host
          - 636         # port
          - 3           # version
          - true       # SSL
          - false        # TLS
  </code></pre>
  
  <h2>My error :</h2>
  
  <p><a href="https://i.stack.imgur.com/y9gyh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y9gyh.png" alt="enter image description here"></a></p>
  
  <p>What's wrong ?<br>
  Thanks</p>