title: Laravel4/PHP: extending a class within different namespaced levels
body: <p>When I extend a class that lives in the same directory level it works fine, but when the extending class lives a lateral-sub directory level, it does not.  Everything is namespaced.  Below is my dir struct and the relevant code. </p>
  
  <p>Dir Struct:</p>
  
  <pre><code>myproj\app\lib\Myproj\
                    |- ...
                    |- Abc\
                        |-  Sublvl1\
                                |- Sublvl1Controller.php
                        |- AbcBaseController.php
                        |- XyzController.php
  </code></pre>
  
  <p>composer.json:</p>
  
  <pre><code>"psr-0": {
      MyProj\\": "app/lib"
  }
  </code></pre>
  
  <p>The Base Class that I want to extend in various places:
  \app\lib\MyProj\Abc\AbcBaseController.php:</p>
  
  <pre><code>&lt;?php namespace MyProj\Abc;
  
  class AbcBaseController extends \BaseController 
  {
      public function __construct()
      {   dd('inside AbcBaseController');  // testing that the class is being applied when extended...
  </code></pre>
  
  <p>app\lib\MyProj\Abc\XyzController.php:</p>
  
  <pre><code>&lt;?php namespace MyProj\Abc;
  class XyzController extends AbcBaseController // works fine
  {
  </code></pre>
  
  <p>app\lib\MyProj\Abc\Sublvl1\Sublvl1Controller.php:</p>
  
  <pre><code>&lt;?php namespace MyProj\Abc\Sublvl1;
  
  use MyProj\Abc\AbcBaseController;
  
  class Sublvl1Controller extends AbcBaseController   // does not work
  {
      ...
  </code></pre>
  
  <p>The AbcBaseController is not applied when inside the MyProj\Abc\Sublvl1 namespace, even though I import it with the "use" statement.  However, the AbcBaseController <em>is</em> applied when inside the MyProj\Abc namespace. </p>
  
  <p>Any insight greatly appreciated.</p>