wp-cli / autoload-splitter

MIT License
4 stars 3 forks source link

Locate `AutoloadSplitter` logic class #5

Closed schlessera closed 6 years ago

schlessera commented 7 years ago

Locating the splitter logic class is now done in the following way:

  1. The Composer plugin reads the value from the composer.json extra key 'splitter-location', and falls back to 'vendor/wp-cli/wp-cli/php/WP_CLI/AutoloadSplitter.php'.

  2. The main wp-cli/wp-cli package overrides this value through the extra key by setting it to 'php/WP_CLI/AutoloadSplitter.php'.

This works for the framework package, as well as for command packages that pull in the framework package as a dependency.

I don't think it works in every case, though, like for example when both the command package and the framework package are pulled in as dependencies.

We need to think of a reliable way, within the Composer autoloader generator plugin, to find out where the wp-cli/wp-cli package is located.

I tried with the mindplay/composer-locator package, but that one only starts to be usable after the autoloader has been dumped.

schlessera commented 6 years ago

wontfix as this package is obsolete as of WP-CLI v2.0.0.