WP CLI Shell not working on Windows

OK, I’ve now solved this.

Here’s what I did.

When I tried to use Composer to install psy/psysh using composer, there was a clash of versions of symphony due to some work I’d done with Laravel. I decided to completely re-install Composer using the Windows installer, since I didn’t really understand what was going on. (First I had to delete it – instructions here: https://stackoverflow.com/questions/30396451/remove-composer).

Once composer was installed, I used just two commands to make everything work perfectly:

composer global require wp-cli/wp-cli

composer global require psy/psysh

Now, when I type wp shell in the command line, it’s good to go. Yay!