Skip to content
This repository has been archived by the owner on Aug 2, 2018. It is now read-only.

Commit

Permalink
Remove mindplay/composer-locator package.
Browse files Browse the repository at this point in the history
Removing the package again, as it unfortunately only works _after_ the autoloader has been dumped, which makes it useless in our case (where we want to use it to control autoloader generation).

Falling back to just assuming that `wp-cli/wp-cli` is installed in the `vendor/wp-cli/wp-cli` folder, as the root package can still override this value.
  • Loading branch information
schlessera committed May 3, 2017
1 parent 7e8d1ba commit 595e91d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 67 deletions.
3 changes: 1 addition & 2 deletions composer.json
Expand Up @@ -24,7 +24,6 @@
"class": "WP_CLI\\AutoloadSplitter\\ComposerPlugin"
},
"require": {
"composer-plugin-api": "^1.1",
"mindplay/composer-locator": "^2.1"
"composer-plugin-api": "^1.1"
}
}
59 changes: 0 additions & 59 deletions composer.lock

This file was deleted.

7 changes: 1 addition & 6 deletions src/ComposerPlugin.php
Expand Up @@ -8,7 +8,6 @@
use Composer\Plugin\PluginInterface;
use Composer\Script\Event;
use Composer\Script\ScriptEvents;
use ComposerLocator;

/**
* Class ComposerPlugin.
Expand Down Expand Up @@ -66,12 +65,8 @@ public static function dump(Event $event)
->getPackage()
->getExtra();

$autoloadSplitterLocationFallback = ComposerLocator::isInstalled('wp-cli/wp-cli')
? ComposerLocator::getPath('wp-cli/wp-cli') . '/php/WP_CLI/AutoloadSplitter.php'
: 'vendor/wp-cli/wp-li/php/WP_CLI/AutoloadSplitter.php';

$splitterLogic = self::getExtraKey(self::LOGIC_CLASS_KEY, 'WP_CLI\AutoloadSplitter');
$splitterLocation = self::getExtraKey(self::LOGIC_CLASS_LOCATION_KEY, $autoloadSplitterLocationFallback);
$splitterLocation = self::getExtraKey(self::LOGIC_CLASS_LOCATION_KEY, 'vendor/wp-cli/wp-li/php/WP_CLI/AutoloadSplitter.php');
$filePrefixTrue = self::getExtraKey(self::SPLIT_TARGET_PREFIX_TRUE_KEY, 'autoload_commands');
$filePrefixFalse = self::getExtraKey(self::SPLIT_TARGET_PREFIX_FALSE_KEY, 'autoload_framework');

Expand Down

0 comments on commit 595e91d

Please sign in to comment.