theseer / Autoload

A lightweight php namespace aware autoload generator and phar archive builder
Other
388 stars 47 forks source link

Fix warning and generated path when file above basedir #55

Closed remicollet closed 9 years ago

remicollet commented 9 years ago

Trying to generate autoloader for phpdocumentor/reflection-docblock (=> Undefined offset)

 $ phpab \
       --basedir src/phpDocumentor/Reflection/DocBlock \
       --output src/phpDocumentor/Reflection/DocBlock/autoload.php \
       src/phpDocumentor/Reflection
 phpab 1.16.2 - Copyright (C) 2009 - 2014 by Arne Blankerts
 Scanning directory src/phpDocumentor/Reflection
 Notice: Undefined offset: 11 in /usr/share/php/TheSeer/Autoload/AutoloadRenderer.php on line 220
 Autoload file src/phpDocumentor/Reflection/DocBlock/autoload.php generated.

And in generated autoloader (double /)

            'phpdocumentor\\reflection\\docblock' => '/..//DocBlock.php',

This should fix both

GrahamCampbell commented 9 years ago

Failing tests?

remicollet commented 9 years ago

Yes... sorry... initial commit introduce a bad regression, Seems ok now.