<h1 dir="auto">Description</h1>
<p dir="auto">Because of usage of <code class="notranslate">realpath</code> in <code class="notranslate">Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension</code>, entities from Phar-packages can't be loaded.</p>
<h1 dir="auto">Steps to reproduce</h1>
<ol dir="auto">
<li>Pack whole the framework with entities in Phar-package or just pack only own code into Phar.</li>
<li>Try to clear the cache or somehow use the entities-related features.</li>
<li>Say "hello" to <code class="notranslate">Doctrine\Common\Persistence\MappingException</code> with message <code class="notranslate">File mapping drivers must have a valid directory path, however the given path  seems to be incorrect!</code></li>
</ol>
<p dir="auto">I was using <a href="https://github.com/BorisMorel/LdapBundle">https://github.com/BorisMorel/LdapBundle</a> before Symfony 2.8, but now with Symfony 3.1 I am using the built-in LDAP mechanism.</p>
<p dir="auto">One of the things I miss is the ability to pull in custom user fields from LDAP. For example I was pulling in email and fullname.</p>
<p dir="auto">Is there a way to do this with Symfony's LDAP component already? I looked at the documentation:<br>
<a href="http://symfony.com/blog/new-in-symfony-2-8-ldap-component" rel="nofollow">http://symfony.com/blog/new-in-symfony-2-8-ldap-component</a><br>
<a href="http://symfony.com/components/Ldap" rel="nofollow">http://symfony.com/components/Ldap</a> (this is blank!!! linked to from the above)<br>
<a href="http://symfony.com/doc/current/cookbook/security/ldap.html" rel="nofollow">http://symfony.com/doc/current/cookbook/security/ldap.html</a></p>
<p dir="auto">and couldn't find either an easy way to do it, or a guide on how to implement this myself if that is the desired way to do it.</p>
<p dir="auto">I propose two things:<br>
a) that the ldap component provide an easy way to configure additional fields to pull in<br>
b) that the documentation reflect this, or a cookbook is made on how to do it ourselves</p>
<p dir="auto">Thanks!</p>