2017 © Pedro Peláez
 

library composer-virtualenv

A simple virtual environment for composer

image

itk-dev/composer-virtualenv

A simple virtual environment for composer

  • Saturday, June 9, 2018
  • by rimi-itk
  • Repository
  • 4 Watchers
  • 0 Stars
  • 18 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 260 % Grown

The README.md

Composer virtualenv

A simple virtual environment for composer., (*1)

Inspired by Python's virtualenv, this package adds a script for prepending vendor/bin to the PATH variable to make it easier to run commands installed via composer., (*2)

Background

Assume your composer.json contains, (*3)

    "require-dev": {
        "phpunit/phpunit": "^6.5",
        "drush/drush": "^9.2"
    }

After running composer install you have to make sure to run vendor/bin/phpunit or vendor/bin/drush, respectively, to run the right command. If you just run phpunit you'll will run any globally installed version of phpunit (or get an error if phpunit is not installed)., (*4)

Composer virtualenv, helps you run the right commands, i.e. the ones installed using composer, without having to (remember to) type vendor/bin/ every time., (*5)

Installation

composer require itk-dev/composer-virtualenv "^1.0"

Activating the virtual environment

To deactivate the virtual environment, run, (*6)

source vendor/bin/activate

Note: It is important to source the script – it will not work if it is run., (*7)

This prepends the path vendor/bin to the PATH environment variable, and any command installed using composer will be run instead of any globally available command of the same name., (*8)

Deactivating the virtual environment

To deactivate the virtual environment and restore the PATH variable to its original value, run, (*9)

deactivate

The Versions

09/06 2018

dev-master

9999999-dev

A simple virtual environment for composer

  Sources   Download

MIT

by Mikkel Ricky

09/06 2018

1.0.0

1.0.0.0

A simple virtual environment for composer

  Sources   Download

MIT

by Mikkel Ricky