title: Cannot use X as Y because the name is already in use, even though it's not
body: <p>I'm using PHP 5.4, and have a PSR-0 class structure similar to the following.</p>
  
  <p><strong>A\Library\Session.php</strong>:</p>
  
  
  
  <pre class="lang-php prettyprint-override"><code>namespace A\Library;
  
  class Session { ... }
  </code></pre>
  
  <p><strong>My\Application\Session.php</strong>:</p>
  
  <pre class="lang-php prettyprint-override"><code>namespace My\Application;
  
  class Session { ... }
  </code></pre>
  
  <p><strong>My\Application\Facebook.php</strong>:</p>
  
  <pre class="lang-php prettyprint-override"><code>namespace My\Application;
  use A\Library\Session;
  
  class Facebook { ... }
  </code></pre>
  
  <p>When I try to run the application, I get the following error:</p>
  
  <blockquote>
    <p>Cannot use A\Library\Session as Session because the name is already in use in My\Application\Facebook.php</p>
  </blockquote>
  
  <p>Even though it's not, at least not in this file. The Facebook.php file declares only the <code>Facebook</code> class, and imports exactly one <code>Session</code> class, the <code>A\Library</code> one.</p>
  
  <p>The only problem I can see is that another <code>Session</code> class exists in the same namespace as the <code>Facebook</code> class, but as it was never imported in the Facebook.php file, I thought it did not matter at all.</p>
  
  <p>Am I wrong (in that case please point to the relevant documentation), or is this a bug?</p>