Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Update PackageManifest::$vendorPath initialisation for cases, when composer vendor dir is not in project directory #41463

Merged
merged 3 commits into from Mar 14, 2022

Conversation

vasymus
Copy link
Contributor

@vasymus vasymus commented Mar 13, 2022

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).

In that case, if you run php artisan package:discover generated bootstrap/cache/packages.php file will contain empty array.

That's why those changes should be accepted, so even if COMPOSER_VENDOR_DIR is changed package discover working correct.

Those changes are backward compatible, because it's assumed that nobody would set or change global environment variable COMPOSER_VENDOR_DIR without reason.

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).
@GrahamCampbell GrahamCampbell changed the title Update PackageManifest::$vendorPath initialisation for cases, when composer vendor dir is not in project directory [9.x] Update PackageManifest::$vendorPath initialisation for cases, when composer vendor dir is not in project directory Mar 13, 2022
@taylorotwell taylorotwell merged commit bf4496e into laravel:9.x Mar 14, 2022
@vasymus vasymus deleted the patch-1 branch March 14, 2022 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants