This pull request addresses an issue with the Laravel Artisan Tinker command where the vendor directory path might not be correctly determined. This fix ensures that the correct vendor directory is used, resolving issues with running the Laravel Artisan Tinker command in various environments.
Changes
Updated the code to use Env::get to retrieve the COMPOSER_VENDOR_DIR environment variable, defaulting to the standard vendor directory path if not set.
Added a check to ensure the determined vendor directory is valid.
If the vendor directory is not valid, it falls back to using the path obtained from InstalledVersions::getRootPackage().
Constructed the path to autoload_classmap.php based on the resolved vendor directory.
This fix will ensure the Laravel Artisan Tinker command functions correctly in various deployment environments, particularly where the vendor directory might be customized or not present by default.
Overview
This pull request addresses an issue with the Laravel Artisan Tinker command where the vendor directory path might not be correctly determined. This fix ensures that the correct vendor directory is used, resolving issues with running the Laravel Artisan Tinker command in various environments.
Changes
Env::get
to retrieve theCOMPOSER_VENDOR_DIR
environment variable, defaulting to the standard vendor directory path if not set.InstalledVersions::getRootPackage()
.autoload_classmap.php
based on the resolved vendor directory.Detailed Changes
Impact
This fix will ensure the Laravel Artisan Tinker command functions correctly in various deployment environments, particularly where the vendor directory might be customized or not present by default.