There are some other questions on this subject already, but none of them were really helpful. I am new to Symfony, so it's pretty hard to get my head around it.
I am in the file Client\IntranetBundle\LDAP\LDAPAuthenticationProvider.php and this code is causing an error:
$user = new LDAPUser($username);
I did add it's namespace which is:
use Client\IntranetBundle\LDAP\LDAPUser;
LDAPUser implements UserInterface
The error I get is
The class 'Client\IntranetBundle\LDAP\LDAPUser' was not found in the chain
configured namespaces Client\ClientBundle\Entity
What is that suppose to mean? From what I read it has something to do with the mapping.
My Doctrine orm in the config.yml is set to:
orm:
auto_generate_proxy_classes: %kernel.debug%
auto_mapping: true
Hopefully you can help me.
EDIT #1:
Actually, I found out that it was not
$user = new LDAPUser($username);
That is causing the error, but it is when I am trying to persist this entity:
$entityManager->persist($user);
EDIT #2:
I'm confused with what's wrong with the mapping:
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="Client\IntranetBundle\LDAP\LDAPUser" table="users" repository-class="Client\ClientBundle\Repository\UserRepository">
<id name="id" type="integer" column="id">
<generator strategy="AUTO" />
</id>
<field name="username" column="username" type="string" length="100" />
</entity>
Maybe it's because I'm jumping between two bundles?