From 41e91f3064cee51dd52f45831dc48748ce37a095 Mon Sep 17 00:00:00 2001 From: M N Islam Shihan Date: Wed, 16 Jan 2013 00:29:02 +0600 Subject: [PATCH] Fixed an issue when a phar file is used in "files" option in composer.json --- src/Composer/Autoload/AutoloadGenerator.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 5991083f7..b7a2820a6 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -294,6 +294,10 @@ EOF; $baseDir = '$vendorDir . '; } + if(preg_match('/\.phar$/', $path)){ + $baseDir = '"phar://" . ' . $baseDir; + } + return $baseDir.var_export($path, true); }