From 81ae9ef2ce9588f6f950c404475f1536d7daab0f Mon Sep 17 00:00:00 2001 From: vasymus <31481727+vasymus@users.noreply.github.com> Date: Sun, 13 Mar 2022 17:03:34 +0200 Subject: [PATCH 1/3] 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). --- src/Illuminate/Foundation/PackageManifest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/PackageManifest.php b/src/Illuminate/Foundation/PackageManifest.php index 202a8beb271d..0ea62b8d2fae 100644 --- a/src/Illuminate/Foundation/PackageManifest.php +++ b/src/Illuminate/Foundation/PackageManifest.php @@ -55,7 +55,7 @@ public function __construct(Filesystem $files, $basePath, $manifestPath) $this->files = $files; $this->basePath = $basePath; $this->manifestPath = $manifestPath; - $this->vendorPath = $basePath.'/vendor'; + $this->vendorPath = getenv('COMPOSER_VENDOR_DIR') ?: $basePath.'/vendor'; } /** From dd2da5e70e6fe68bba5fe3b2918a591ab373b678 Mon Sep 17 00:00:00 2001 From: vasymus <31481727+vasymus@users.noreply.github.com> Date: Sun, 13 Mar 2022 22:28:17 +0200 Subject: [PATCH 2/3] Update PackageManifest.php --- src/Illuminate/Foundation/PackageManifest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/PackageManifest.php b/src/Illuminate/Foundation/PackageManifest.php index 0ea62b8d2fae..e589989978dd 100644 --- a/src/Illuminate/Foundation/PackageManifest.php +++ b/src/Illuminate/Foundation/PackageManifest.php @@ -55,7 +55,7 @@ public function __construct(Filesystem $files, $basePath, $manifestPath) $this->files = $files; $this->basePath = $basePath; $this->manifestPath = $manifestPath; - $this->vendorPath = getenv('COMPOSER_VENDOR_DIR') ?: $basePath.'/vendor'; + $this->vendorPath = env('COMPOSER_VENDOR_DIR') ?: $basePath.'/vendor'; } /** From 5ee5444f4ae7952f0b34d56497168d0173320c2e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 14 Mar 2022 14:49:07 -0500 Subject: [PATCH 3/3] formatting --- src/Illuminate/Foundation/PackageManifest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/PackageManifest.php b/src/Illuminate/Foundation/PackageManifest.php index e589989978dd..9767feb99f22 100644 --- a/src/Illuminate/Foundation/PackageManifest.php +++ b/src/Illuminate/Foundation/PackageManifest.php @@ -4,6 +4,7 @@ use Exception; use Illuminate\Filesystem\Filesystem; +use Illuminate\Support\Env; class PackageManifest { @@ -55,7 +56,7 @@ public function __construct(Filesystem $files, $basePath, $manifestPath) $this->files = $files; $this->basePath = $basePath; $this->manifestPath = $manifestPath; - $this->vendorPath = env('COMPOSER_VENDOR_DIR') ?: $basePath.'/vendor'; + $this->vendorPath = Env::get('COMPOSER_VENDOR_DIR') ?: $basePath.'/vendor'; } /**