LDAP symfony - Authentication only, no search

As I could see LDAP sympony performs the search by default and if you try to use ldap authentication without populating search dn and search password the authenticator gives an error on the filter even if we have not actually set any filter. we have overcome the problem by inserting the code in Global Code

Config()->remove("SECURITY.providers.all_users.chain.providers.0");

allows you to use LDAP Sympony only for authentication.