# install dependencies
composer install --no-interaction --prefer-source
-composer require d11wtq/boris=dev-master --no-interaction --prefer-source
# set up WP install
./bin/wp core download --version=$WP_VERSION --path=/tmp/wp-cli-test-core-download-cache/
"rmccue/requests": "dev-master"
},
"suggest": {
- "d11wtq/boris": "Enhanced `wp shell` functionality"
+ "psy/psysh": "Enhanced `wp shell` functionality"
},
"autoload": {
"psr-0": { "WP_CLI": "php" }
*/
public function __invoke( $_, $assoc_args ) {
$implementations = array(
+ '\\Psy\\Shell',
'\\Boris\\Boris',
'\\WP_CLI\\REPL',
);
if ( isset( $assoc_args['basic'] ) ) {
- unset( $implementations[0] );
+ $class = '\\WP_CLI\\REPL';
+ } else {
+ foreach ( $implementations as $candidate ) {
+ if ( class_exists( $candidate ) ) {
+ $class = $candidate;
+ break;
+ }
+ }
}
- foreach ( $implementations as $class ) {
- if ( class_exists( $class ) ) {
- $repl = new $class( 'wp> ' );
- $repl->start();
- break;
- }
+ if ( '\\Psy\\Shell' == $class ) {
+ \Psy\Shell::debug();
+ } else {
+ $repl = new $class( 'wp> ' );
+ $repl->start();
}
}
}