Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sanderdlm/static
https://github.com/sanderdlm/static
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sanderdlm/static
- Owner: sanderdlm
- License: mit
- Created: 2023-02-27T15:48:00.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-26T11:44:46.000Z (about 1 year ago)
- Last Synced: 2023-10-26T12:43:58.009Z (about 1 year ago)
- Language: PHP
- Size: 7.94 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Basic proof-of-concept of creating static binaries of PHP CLI tools
Inside the `bin/` folder, you'll find a [single command Symfony console application](https://symfony.com/doc/current/components/console/single_command_tool.html). Some arbitrary code from inside `src/` is executed from the command.
There is a [GitHub Action](https://github.com/dreadnip/static/blob/master/.github/workflows/php.yml) that builds the binary in `bin/` into a PHAR file, using [box-project/box](https://github.com/box-project/box).
The PHAR is prepended with the micro self-executable SAPI from [phpmicro](https://github.com/dixyes/phpmicro/blob/master/Readme.EN.md).
The resulting binary is preserved as an artifact from each run. Open the last workflow on [this page](https://github.com/dreadnip/static/actions) and you'll find the binary under the artifacts near the bottom.
Download the binary, unzip it and `chmod +x` it.