pronskiy / locus

Installs a per-project php binary based on composer.json requirement

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Locus

Installs a per-project php binary to the ./vendor/bin/ based on composer.json requirements.

Setup and Installation

Make sure you have a PHP version constraint specified in your composer.json:

"require": {
  "php": "^8.3"
},

Then run the following command to add locus:

composer require pronskiy/locus --dev 

You'll be asked to allow the composer plugin, reply y. Or if you are adding the dependency manually, add the following to your composer.json:

"config": {
  "allow-plugins": {
    "pronskiy/locus": true
  }
}

Usage

Now you always have your per-project php binary to execute PHP scripts directly from the command line.

./vendor/bin/php --version

Credits

This package entirely relies on https://github.com/static-php.

About

Installs a per-project php binary based on composer.json requirement

License:Apache License 2.0


Languages

Language:PHP 100.0%