From 4365b16811300622ef17c079e010c776bf9eb793 Mon Sep 17 00:00:00 2001 From: scribu Date: Sat, 11 May 2013 23:28:24 +0300 Subject: [PATCH] autoload from local vendor dir, then from global This allows running `composer update` on the spot and without switching the wp-cli repo back to the master branch. This also allows using suggested packages from a super-project (most common being ~/.composer). --- php/utils.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/php/utils.php b/php/utils.php index 7ef91543..07aa0a08 100644 --- a/php/utils.php +++ b/php/utils.php @@ -8,8 +8,8 @@ use \WP_CLI\Dispatcher; function load_dependencies() { $vendor_paths = array( - WP_CLI_ROOT . '../../../../vendor', // part of a larger project WP_CLI_ROOT . '../vendor', // top-level project + WP_CLI_ROOT . '../../../../vendor', // part of a larger project ); $has_autoload = false; @@ -18,7 +18,6 @@ function load_dependencies() { if ( file_exists( $vendor_path . '/autoload.php' ) ) { require $vendor_path . '/autoload.php'; $has_autoload = true; - break; } } -- 2.11.0