Skip to content

Commit

Permalink
Merge pull request #295 from RLasinski/fix-composer-autoloader-rewrite
Browse files Browse the repository at this point in the history
Use PathResolver to resolve unresolved paths from the composer
  • Loading branch information
lisachenko authored Dec 13, 2016
2 parents 21618e8 + 8490b59 commit eec2c71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Instrument/ClassLoading/AopComposerLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

use Go\Core\AspectContainer;
use Go\Instrument\FileSystem\Enumerator;
use Go\Instrument\PathResolver;
use Go\Instrument\Transformer\FilterInjectorTransformer;
use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
Expand Down Expand Up @@ -155,6 +156,7 @@ public function findFile($class)
$file = $this->original->findFile($class);

if ($file) {
$file = PathResolver::realpath($file)?:$file;
$cacheState = isset($this->cacheState[$file]) ? $this->cacheState[$file] : null;
if ($cacheState && $isProduction) {
$file = $cacheState['cacheUri'] ?: $file;
Expand Down

0 comments on commit eec2c71

Please sign in to comment.