Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions features/bootstrap.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ Feature: Bootstrap WP-CLI
"""
<?php
if ( ! class_exists( 'WP_CLI' ) ) {
return;
return;
}
$autoload = dirname( __FILE__ ) . '/vendor/autoload.php';
$autoload = __DIR__ . '/vendor/autoload.php';
if ( file_exists( $autoload ) ) {
require_once $autoload;
require_once $autoload;
}
WP_CLI::add_command( 'cli', 'CLI_Command', array( 'when' => 'before_wp_load' ) );
"""
And a cli-override-command/src/CLI_Command.php file:
"""
<?php
class CLI_Command extends WP_CLI_Command {
public function version() {
WP_CLI::success( "WP-Override-CLI" );
}
public function version() {
WP_CLI::success( 'WP-Override-CLI' );
}
}
"""
And a cli-override-command/composer.json file:
Expand Down
Loading