Code Monkey home page Code Monkey logo

pa's Introduction

bash_unit CI Shellcheck CI GH Language GH stars GH tag GH License basher install

pforret/pa

Run php artisan and composer with the correct PHP version for the project, derived from composer.json

๐Ÿ”ฅ Usage

Program : pa by [email protected]
Version : v0.1.1 (2023-01-08 21:29)
Purpose : php artisan replacement
Usage   : pa [-h] [-q] [-v] [-f] [-l <log_dir>] [-t <tmp_dir>] [-P <OVERRIDE_PHP>] <action>
Flags, options and parameters:
    -h|--help        : [flag] show usage [default: off]
    -q|--quiet       : [flag] no output [default: off]
    -v|--verbose     : [flag] also show debug messages [default: off]
    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]
    -l|--log_dir <?> : [option] folder for log files   [default: /home/pforret/log/pa]
    -t|--tmp_dir <?> : [option] folder for temp files  [default: /tmp/pa]
    -P|--OVERRIDE_PHP <?>: [option] override PHP binary to use (e.g. php8.1)
    <action>         : [parameter] action to perform (see pa -h for details)
โœ…  Remote: gh_pforret:pforret/pa.git
                                  
### TIPS & EXAMPLES
* use pa list to show the available PHP versions on this machine
  pa list
* use pa pick to show the best PHP version for this machine/repo
  pa pick
* use pa co to run 'composer' with the optimal PHP version
  pa co require author/package
  pa co install

โšก๏ธ Examples

# run `php artisan`, but with the correct PHP version for this project
$ pa route:list
$ pa make:model ModelName

# run `composer install`, with the correct PHP version
> pa c install
> pa co install
> pa com install
> pa comp install
> pa composer install

# run `composer require` author/package, with the correct PHP version
> pa co require author/package

# run 'pa pick' to see what PHP version would be chosen in this folder
# will parse PHP requirements from composer.json like "^8.0" or "^7.4|^8.0" 
# and use the lowest version of PHP that is installed and qualifies
$ pa pick
/usr/bin/php7.4

# show all available PHP versions on this machine
> pa list
# Installed on this machine [name]:
# - - - - - - - - - - - - - - - - - - - - -
# /usr/bin/php              8.0.26          โœ…  Supported until 2023-11-26
# /usr/bin/php8.2           8.2.0           โœ…  Supported until 2025-12-08
# /usr/bin/php8.1           8.1.13          โœ…  Supported until 2024-11-25
# /usr/bin/php8.0           8.0.26          โœ…  Supported until 2023-11-26
# /usr/bin/php7.4           7.4.33          โ›”  Unsupported since 2022-11-28
# /usr/local/bin/composer   2.5.1 2022-12-22

๐Ÿš€ Installation

with basher

$ basher install pforret/pa

or with git

$ git clone https://github.com/pforret/pa.git
$ cd pa

๐Ÿ“ Acknowledgements

ยฉ 2022 Peter Forret

pa's People

Contributors

cinemapub avatar pforret avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.