Skip to content

Commit bf4496e

Browse files
[9.x] Update PackageManifest::$vendorPath initialisation for cases, when composer vendor dir is not in project directory (#41463)
* Update PackageManifest.php It's possible, that for some reason, vendor dir could be in another directory (https://getcomposer.org/doc/03-cli.md#composer-vendor-dir). For example, when you change vendor dir in docker image for easier app bind mounting (https://github.com/BretFisher/php-docker-good-defaults/blob/master/Dockerfile). * Update PackageManifest.php * formatting Co-authored-by: Taylor Otwell <[email protected]>
1 parent 1d3a599 commit bf4496e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Illuminate/Foundation/PackageManifest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Exception;
66
use Illuminate\Filesystem\Filesystem;
7+
use Illuminate\Support\Env;
78

89
class PackageManifest
910
{
@@ -55,7 +56,7 @@ public function __construct(Filesystem $files, $basePath, $manifestPath)
5556
$this->files = $files;
5657
$this->basePath = $basePath;
5758
$this->manifestPath = $manifestPath;
58-
$this->vendorPath = $basePath.'/vendor';
59+
$this->vendorPath = Env::get('COMPOSER_VENDOR_DIR') ?: $basePath.'/vendor';
5960
}
6061

6162
/**

0 commit comments

Comments
 (0)