Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've worked around this issue (originally mentioned here) in other ways, and assumed based on previous discussions that I must have something misconfigured or am doing something wrong. But I've just spun up a new site with Carbon Fields, everything in standard locations, and I'm convinced that I might not be the only one, and should submit a PR.
Here's the problem: I'm using CF as a plugin, installed with composer as it's supposed to be. The directory structure is standard WP, with these relevant pieces:
/wp-content/plugins/carbon-fields-plugin
/wp-content/plugins/my-custom-plugin
/vendor/autoload.php
/composer.json
There's nowhere else in the codebase attempting to load the autoload.php file, because CF is currently the only composer-installed piece. The CF plugin is supposed to fill that need as I understand it, but it only checks for the autoload file in its own directory via DIR, which doesn't working here. So I've added a conditional to look for the vendor/autoload file in the WordPress root, which seems like a reasonable fallback to include.
Am I missing something about the way composer should be working that this is a bad choice?