Skip to content
Merged
9 changes: 9 additions & 0 deletions features/bootstrap.feature
Original file line number Diff line number Diff line change
Expand Up @@ -535,3 +535,12 @@ Feature: Bootstrap WP-CLI
"""
YIKES!
"""

Scenario: Package autoloader has priority over fallback autoloader
Given an empty directory

# Verify both autoloaders are loaded in debug output, and that the fallback
# autoloader is initialized before the package autoloader so that locally
# installed packages override phar-bundled versions.
When I try `wp cli version --debug`
Then STDERR should match /WP_CLI\\Bootstrap\\IncludeFallbackAutoloader[\s\S]*WP_CLI\\Bootstrap\\IncludePackageAutoloader/
2 changes: 1 addition & 1 deletion php/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ function get_bootstrap_steps() {
Bootstrap\DefineProtectedCommands::class,
Bootstrap\LoadExecCommand::class,
Bootstrap\LoadRequiredCommand::class,
Bootstrap\IncludePackageAutoloader::class,
Bootstrap\IncludeFallbackAutoloader::class,
Bootstrap\IncludePackageAutoloader::class,
Bootstrap\RegisterFrameworkCommands::class,
Bootstrap\RegisterDeferredCommands::class,
Bootstrap\InitializeContexts::class,
Expand Down
Loading