Download the PHP package uma/composer-psysh without Composer
On this page you can find all versions of the php package uma/composer-psysh. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package composer-psysh
uma/composer-psysh
A no-frills PsySH-Composer plugin.
In a nutshell, it provides a composer shell
subcommand that spawns a Psy Shell with autoload
integration when applicable.

Installation
This package is meant to be used as a global requirement for your Composer installation:
Alternatively it can be required on a per-project basis as a development dependency.
Note that in this case the shell
subcommand will only be available in the project root.
Composer 2.2 and above
Starting from version 2.2.0 Composer requires plugins to be whitelisted in the composer.json
file.
After updating to +2.2, the first time you run composer shell
it will ask you once if you want to
add the plugin to the allow-plugins
config section.
You'll need to answer Yes.
Usage
composer psy
can be run anywhere and will spawn a generic REPL.
However, when it runs at the root of a project it will require the vendor/autoload.php
script
so that the project's classes will be readily available in the shell.
The plugin also defines a couple other aliases: composer repl
and composer psy
.
Comparison between uma/composer-psysh
and ramsey/composer-repl
This package was inspired by ramsey/composer-repl
.
In fact, it only provides a subset of its features.
I decided to write my own version for a couple of reasons:
First, Ben Ramsey's plugin requires PHP 7.4 or later, which is too restrictive for me.
uma/composer-psysh
allows a wide range of PHP versions: from 5.5 to 8.1.
This is pretty similar to the range of versions allowed by PsySH and Composer themselves.
Second, ramsey/composer-repl
has additional functionality to integrate PHPUnit into PsySH.
Because of this it has a hard dependency on phpunit/phpunit
.
I wasn't keen on being forced to pull PHPUnit alongside the plugin, especially since I don't need that feature.
Caveats
Only works on Unix environments (for now?)