From 27b8209990abae71433e71363cc459b02e21bfc4 Mon Sep 17 00:00:00 2001 From: Saumini Navaratnam Date: Mon, 19 Jun 2017 12:32:39 +0800 Subject: [PATCH] Fix for issue #6492 Able to include specific finle in phar in "files" option in composer --- 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 1953e593a..fabcda6a7 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -534,6 +534,10 @@ EOF; } } + if (preg_match('/\.phar.+$/', $path)) { + $baseDir = "'phar://' . " . $baseDir; + } + return $baseDir . (($path !== false) ? var_export($path, true) : ""); }