Maks3w / FR3DLdapBundle

This bundle integrates LDAP Authentication with any user manager (Ex: FOSUserBundle)
119 stars 77 forks source link

Building symfony container will error if Fosuserbundle is not installed. #148

Closed peec closed 5 years ago

peec commented 6 years ago

Hello,

Thanks for this great bundle, using it together with eZ Platform without problems.

I had to install FOSUserbundle and add it to the kernel because of a service dependency here: https://github.com/Maks3w/FR3DLdapBundle/blob/6bc696ec034ab07861d1973e9830465778948553/Resources/config/services.xml#L20

Without this, building the service container will fail (even if using a custom hydrator - which i do use).

Possible fix

<service id="fr3d_ldap.user_hydrator.fosuserbundle" class="FR3D\LdapBundle\Hydrator\LegacyHydrator">
    <argument type="service" id="fos_user.user_manager" on-invalid="null"  />
    <argument>%fr3d_ldap.ldap_manager.parameters%</argument>
</service>
Maks3w commented 6 years ago

If you define a custom hydrator first That is fix the issue?