PHPackages                             uma/composer-psysh - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. uma/composer-psysh

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

uma/composer-psysh
==================

No-frills PsySH-Composer plugin

v0.3.1(today)183.2k1MITPHPPHP ^7.4||^8.0

Since Jul 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/1ma/composer-psysh)[ Packagist](https://packagist.org/packages/uma/composer-psysh)[ RSS](/packages/uma-composer-psysh/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (6)Versions (6)Used By (0)

uma/composer-psysh
------------------

[](#umacomposer-psysh)

A no-frills PsySH-Composer plugin.

In a nutshell, it provides a `composer shell` subcommand that spawns a [Psy Shell](https://psysh.org/) with autoload integration when applicable.

 [![composer-psysh in action](https://camo.githubusercontent.com/3abfd58d9cb653a9d0717b965c1e395663adcab84e3ee6004b47ad1aa818ef0c/68747470733a2f2f692e696d6775722e636f6d2f4f5a41444a55562e676966)](https://camo.githubusercontent.com/3abfd58d9cb653a9d0717b965c1e395663adcab84e3ee6004b47ad1aa818ef0c/68747470733a2f2f692e696d6775722e636f6d2f4f5a41444a55562e676966)

### Installation

[](#installation)

This package is meant to be used as a global requirement for your Composer installation:

```
$ composer global require uma/composer-psysh
```

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 require --dev uma/composer-psysh
```

#### Composer 2.2 and above

[](#composer-22-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.

```
$ composer shell
uma/composer-psysh contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "uma/composer-psysh" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
Psy Shell v0.11.0 (PHP 8.1.0 — cli) by Justin Hileman
Active Autoloaders:
  /home/marcel/.config/composer/vendor/autoload.php

>>> "oh well"

```

### Usage

[](#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`

[](#comparison-between-umacomposer-psysh-and-ramseycomposer-repl)

This package was inspired by [`ramsey/composer-repl`](https://github.com/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

[](#caveats)

Only works on Unix environments (for now?)

###  Health Score

38

↑

LowBetter than 84% of packages

Maintenance55

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~440 days

Total

5

Last Release

0d ago

PHP version history (3 changes)v0.1.0PHP ^5.5|^7.0|^8.0

v0.2.1PHP ^5.5||^7.0||^8.0

v0.3.0PHP ^7.4||^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e9c44fd950318b0691210b9e372cfaae750d5d6a0b37500676ff636b3a58f1f?d=identicon)[1ma](/maintainers/1ma)

---

Top Contributors

[![1ma](https://avatars.githubusercontent.com/u/1456708?v=4)](https://github.com/1ma "1ma (11 commits)")[![nsrosenqvist](https://avatars.githubusercontent.com/u/1303475?v=4)](https://github.com/nsrosenqvist "nsrosenqvist (1 commits)")

### Embed Badge

![Health badge](/badges/uma-composer-psysh/health.svg)

```
[![Health](https://phpackages.com/badges/uma-composer-psysh/health.svg)](https://phpackages.com/packages/uma-composer-psysh)
```

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M14](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M440](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
