{"id":20217707,"url":"https://github.com/pforret/pa","last_synced_at":"2026-04-28T12:31:33.227Z","repository":{"id":144772601,"uuid":"541637011","full_name":"pforret/pa","owner":"pforret","description":"wrapper around \"php artisan\" but more intelligent (use optimal PHP version for the project)","archived":false,"fork":false,"pushed_at":"2025-03-20T08:34:13.000Z","size":740,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T08:02:50.674Z","etag":null,"topics":["artisan","bash","bashew","composer","php"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pforret.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-26T14:47:37.000Z","updated_at":"2025-03-20T08:34:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"1fc939ce-7df8-41d0-9fa6-8090af933928","html_url":"https://github.com/pforret/pa","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":"pforret/bashew","purl":"pkg:github/pforret/pa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fpa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fpa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fpa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fpa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pforret","download_url":"https://codeload.github.com/pforret/pa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fpa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32381243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artisan","bash","bashew","composer","php"],"created_at":"2024-11-14T06:35:17.013Z","updated_at":"2026-04-28T12:31:33.209Z","avatar_url":"https://github.com/pforret.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![bash_unit CI](https://github.com/pforret/pa/workflows/bash_unit%20CI/badge.svg)\n![Shellcheck CI](https://github.com/pforret/pa/workflows/Shellcheck%20CI/badge.svg)\n![GH Language](https://img.shields.io/github/languages/top/pforret/pa)\n![GH stars](https://img.shields.io/github/stars/pforret/pa)\n![GH tag](https://img.shields.io/github/v/tag/pforret/pa)\n![GH License](https://img.shields.io/github/license/pforret/pa)\n[![basher install](https://img.shields.io/badge/basher-install-white?logo=gnu-bash\u0026style=flat)](https://basher.gitparade.com/package/)\n\n# pforret/pa\n\n![](assets/pa.jpg)\n\nRun `php artisan` and `composer` with the correct PHP version for the project, derived from composer.json\n\n## 🔥 Usage\n\n```\nProgram : pa by peter@forret.com\nVersion : v0.2.0 (2025-03-20 09:22)\nPurpose : php artisan replacement\nUsage   : pa [-h] [-q] [-v] [-f] [-l \u003clog_dir\u003e] [-t \u003ctmp_dir\u003e] [-P \u003cOVERRIDE_PHP\u003e] \u003caction\u003e\nFlags, options and parameters:\n    -h|--help        : [flag] show usage [default: off]\n    -q|--quiet       : [flag] no output [default: off]\n    -v|--verbose     : [flag] also show debug messages [default: off]\n    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]\n    -l|--log_dir \u003c?\u003e : [option] folder for log files   [default: /home/forretp/log/pa]\n    -t|--tmp_dir \u003c?\u003e : [option] folder for temp files  [default: /tmp/pa]\n    -P|--OVERRIDE_PHP \u003c?\u003e: [option] override PHP binary to use (e.g. php8.1)\n    \u003caction\u003e         : [parameter] action to perform (see pa -h for details)\n                                  \n### TIPS \u0026 EXAMPLES\n* use pa list to show the available PHP versions on this machine\n  pa list\n* use pa pick to show the best PHP version for this machine/repo\n  pa pick\n* use pa co to run 'composer' with the optimal PHP version\n  pa co require author/package\n  pa co install\n* use pa serve to run 'php artisan serve' with unique port per project\n  pa serve\n \n\u003e\u003e\u003e bash script created with pforret/bashew\n```\n\n## ⚡️ Examples\n\n```bash\n# run `php artisan`, but with the correct PHP version for this project\n$ pa route:list\n$ pa make:model ModelName\n\n# run `composer install`, with the correct PHP version\n\u003e pa c install\n\u003e pa co install\n\u003e pa com install\n\u003e pa comp install\n\u003e pa composer install\n\n# run `composer require` author/package, with the correct PHP version\n\u003e pa co require author/package\n\n# run 'pa pick' to see what PHP version would be chosen in this folder\n# will parse PHP requirements from composer.json like \"^8.0\" or \"^7.4|^8.0\" \n# and use the lowest version of PHP that is installed and qualifies\n$ pa pick\n/usr/bin/php7.4\n\n# run 'pa serve' to start 'php artisan serve' command with right PHP version\n# and a specific pseudo-random port per project (derived from folder name)\n# or with the .env settings, if any\n# e.g. APP_URL=http://project.test:8010\n$ pa serve\n--------------------------------\nopen http://project.test:8010 in 5 seconds\npress CTRL-C to stop this server\n--------------------------------\n\n# show all available PHP versions on this machine\n\u003e pa list\n# Installed on this machine [name]:\n# - - - - - - - - - - - - - - - - - - - - -\n# /usr/bin/php              8.0.26          ✅  Supported until 2023-11-26\n# /usr/bin/php8.2           8.2.0           ✅  Supported until 2025-12-08\n# /usr/bin/php8.1           8.1.13          ✅  Supported until 2024-11-25\n# /usr/bin/php8.0           8.0.26          ✅  Supported until 2023-11-26\n# /usr/bin/php7.4           7.4.33          ⛔  Unsupported since 2022-11-28\n# /usr/local/bin/composer   2.5.1 2022-12-22\n```\n\n## 🚀 Installation\n\nwith [basher](https://github.com/basherpm/basher)\n\n\t$ basher install pforret/pa\n\nor with `git`\n\n\t$ git clone https://github.com/pforret/pa.git\n\t$ cd pa\n\n## 📝 Acknowledgements\n\n* script created with [bashew](https://github.com/pforret/bashew)\n\n\u0026copy; 2022-2025 Peter Forret\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fpa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpforret%2Fpa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fpa/lists"}