Closed JPry closed 7 years ago
@JPry Thanks for the PR.
We currently don't have a test for this particular use case, so before I review and merge your PR, I want to make sure we have a test that currently breaks and that your PR will fix.
I will ping you as soon as that test is ready, so we can merge master
and verify this PR.
@schlessera Would the test you're describing live in this repo, or the main WP CLI repo? Or even somewhere else entirely?
@JPry In the wp-cli/wp-cli
repo: https://github.com/wp-cli/wp-cli/issues/4137
@schlessera @pierre-dargham This test has been updated with the latest changes to master
.
Related to #5.
I have a project with a custom setting for
vendor-dir
. In attempting to includewp-cli/wp-cli
as a dependency, I was getting the following error from this repo:I was able to resolve the error with the following config setting:
While this works, I think that the fallback for the AutoloadSplitter location should use the configured
vendor-dir
setting for Composer, rather than the hardcodedvendor/
directory. While it is currently possible to override the hardcoded option with a configextra
value, this shouldn't be necessary for a custom vendor directory.This PR updates the
WP_CLI\AutoloadSplitter\ComposerPlugin
class to properly account for the configuredvendor-dir
from Composer.