A no-frills PsySH-Composer plugin

Last update: May 23, 2022

uma/composer-psysh

A no-frills PsySH-Composer plugin.

In a nutshell, it provides a composer psy subcommand that spawns a Psy Shell with autoload integration when applicable.

composer-psysh in action

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 psy subcommand will only be available in the project root.

$ composer require --dev uma/composer-psysh

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 of other aliases: composer repl and composer shell.

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.0. 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?)

GitHub

https://github.com/1ma/composer-psysh
You might also like...

:musical_note: Provides a composer plugin for normalizing composer.json.

:musical_note: Provides a composer plugin for normalizing composer.json.

composer-normalize Provides a composer plugin for normalizing composer.json. Why When it comes to formatting composer.json, you have the following opt

May 28, 2022

Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Imposter Plugin Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins. Built with ♥ by Typ

May 16, 2022

Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Imposter Plugin Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins. Built with ♥ by Typ

May 16, 2022

Composer Registrar Composer Plugin for Magento 2

This module add a global registration.php that replace the default glob search performed for each request to discover the components not installed from composer.

Mar 22, 2022

Simple static Composer repository generator - For a full private Composer repo use Private Packagist

Satis Simple static Composer repository generator. Run from source Satis requires a recent PHP version, it does not run with unsupported PHP versions.

May 25, 2022

Merge one or more additional composer.json files at Composer runtime

Composer Merge Plugin Merge multiple composer.json files at Composer runtime. Composer Merge Plugin is intended to allow easier dependency management

May 16, 2022

Simple composer script to manage phar files using project composer.json.

Simple composer script to manage phar files using project composer.json.

tooly-composer-script With tooly composer-script you can version needed PHAR files in your project's composer.json without adding them directly to a V

Aug 3, 2021

A Composer tool to show unused Composer dependencies by scanning your code.

A Composer tool to show unused Composer dependencies by scanning your code.

composer-unused A Composer tool to show unused Composer dependencies by scanning your code. Created by Andreas Frömer and contributors, logo by Caneco

May 20, 2022

A CLI tool to check whether a specific composer package uses imported symbols that aren't part of its direct composer dependencies

A CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package. This will prevent you from using "soft" dependencies that are not defined within your composer.json require section.

May 17, 2022

A Composer script to run a 'test' or 'spec' Composer script against multiple PHP versions.

composer-multitest composer-multitest is a Composer script that runs a test or spec Composer script against multiple PHP versions managed by PHPBrew o

Aug 27, 2019

Tool to convert from composer.yml to composer.json.

composer-yaml This project allows you to convert a composer.yml file into composer.json format. It will use those exact filenames of your current work

Nov 19, 2021

Magento-composer-installer - Composer installer for Magento modules

Magento-composer-installer - Composer installer for Magento modules

!!! support the maintainer of this project via Patreon: https://www.patreon.com/Flyingmana Magento Composer Installer The purpose of this project is t

May 18, 2022

Composer Repository Manager for selling Magento 2 extension and offering composer installation for ordered packages.

Magento 2 Composer Repository Credits We got inspired by https://github.com/Genmato. Composer Repository for Magento 2 This extension works as a Magen

Dec 16, 2021

Composer registry manager that help to easily switch to the composer repository you want

CRM - Composer Registry Manager Composer Registry Manager can help you easily and quickly switch between different composer repositories. 简体中文 Install

May 18, 2022

Dependency graph visualization for composer.json (PHP + Composer)

Dependency graph visualization for composer.json (PHP + Composer)

clue/graph-composer Graph visualization for your project's composer.json and its dependencies: Table of contents Usage graph-composer show graph-compo

May 18, 2022

composer parallel install plugin

composer parallel install plugin

prestissimo (composer plugin) This is a composer 1.x plugin that downloads packages in parallel to speed up the installation process. Announcement: Co

May 20, 2022

Composer Plugin for simpler registration of Rector extension configs

Rector Extension Installer Composer plugin for automatic installation of Rector extensions. Usage composer require --dev rector/extension-installer In

Feb 1, 2022

Simple patches plugin for Composer

composer-patches Simple patches plugin for Composer. Applies a patch from a local or remote file to any package required with composer. Support notes

May 19, 2022

Composer plugin for Repman - PHP Repository Manager

Repman Composer Plugin Composer plugin for Repman - PHP Repository Manager. Adds a mirror url for all your dependencies without need to update compose

Mar 14, 2022
Simple static Composer repository generator - For a full private Composer repo use Private Packagist

Satis Simple static Composer repository generator. Run from source Satis requires a recent PHP version, it does not run with unsupported PHP versions.

May 25, 2022
Merge one or more additional composer.json files at Composer runtime

Composer Merge Plugin Merge multiple composer.json files at Composer runtime. Composer Merge Plugin is intended to allow easier dependency management

May 16, 2022
Simple composer script to manage phar files using project composer.json.
Simple composer script to manage phar files using project composer.json.

tooly-composer-script With tooly composer-script you can version needed PHAR files in your project's composer.json without adding them directly to a V

Aug 3, 2021
composer parallel install plugin
composer parallel install plugin

prestissimo (composer plugin) This is a composer 1.x plugin that downloads packages in parallel to speed up the installation process. Announcement: Co

May 20, 2022
Check your Composer dependencies at runtime.

Composition Composition provides a lightweight and generic API, that you can use to check your environment at runtime, instead of manually go checking

May 4, 2021
Patch other composer packages on install or update

patch-installer Patch other composer packages on install or update. experimental feature Usage For a patch type change the install path to vendor dire

Apr 11, 2021
Easily parse your project's Composer configuration, and those of its dependencies, at runtime

Composed This library provides a set of utility functions designed to help you parse your project's Composer configuration, and those of its dependenc

Apr 11, 2021
Satis-go is a web server for hosting and managing your Satis Repository for Composer Packages

Satis-go download latest Satis-go is a web server for hosting and managing your Satis Repository for Composer Packages Some Highlights: Satis-go provi

Dec 14, 2021
A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the vendor folder.

composer-custom-directory-installer A composer plugin, to install differenty types of composer packages in custom directories outside the default comp

Apr 22, 2022
Ied plugin composer - Inspired Plugin Composer: Create, publish and edit plugins from within Textpattern CMS.

ied_plugin_composer Create, publish and edit plugins from within Textpattern CMS. Creates a new page under the Extensions tab where you can edit and e

Oct 3, 2020