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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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.

composer-psysh in action

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


All versions of composer-psysh with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4||^8.0
composer-plugin-api Version ^1.0||^2.0
psy/psysh Version ~0.12
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package uma/composer-psysh contains the following files

Loading the files please wait ....