wp-cli / shell-command

Opens an interactive PHP console for running and testing PHP code.
MIT License
20 stars 16 forks source link

Provide an installable package for the optional PsySH enhancement #11

Closed schlessera closed 6 years ago

schlessera commented 7 years ago

Right now, using PsySH as the alternative shell implementation requires a rather technical change to the internals of WP-CLI:

I'd like to create a new package wp-cli/shell-psysh that you can just install through the WP-CLI package manager to replace the default shell instead (naming of the package up for discussion of course).

schlessera commented 6 years ago

I had already created this as a personal package here: https://github.com/schlessera/wp-cli-psysh

This can be moved to the wp-cli organization to provide it as an official package as well, but the immediate need that this issue refers to is already met through this package.

JollyWizard commented 6 years ago

I know the issue is closed, but I wanted to point out to anyone else who comes by that there is a third option for using the psysh that can be applied to an unmodified, packaged wp command.

# Fetch the psysh command with wget (as recommended on psysh homepage)
wget https://git.io/psysh

# Add psysh as a default require for all wp-cli commands.
echo "require: psysh" >> ~/.wp-cli/wp-cli.yml