box
box copied to clipboard
Add installer
Note: the description has been edited to go through the issue more easily.
The goal here is to be able to generate a installer file a la Composer (cf. Composer installer.php) which:
- Is compatible with low and restricted PHP environments in order to run the appropriate checks
- Checks the environments (like the requirement checker itself) to know if the PHAR being installed can be used in the current environment and fail gracefully if cannot
- Download the PHAR over HTTPS & potentially run a signature check a la phar.io (to be checked if some code from it can be re-used from there)
Original description:
Also requires to have the dependencies checked like done in PHP-Scoper
See https://github.com/box-project/box2/issues/154
https://github.com/KEINOS/Phar_Box3_installer from #165
Install via Homebrew
https://github.com/humbug/homebrew-box from https://github.com/humbug/box/issues/275 by @pierredup
Simple and easy 👍
Homebrew should now be mentioned in the installation docs but the installer mentioned here is a bit different since unlike homebrew it would check:
- the environment compatibility, e.g. the PHP version, extension enabled or PHP configuration
- checking the signature when downloading the PHAR a la https://phar.io (potentially re-using their code)
Aha! Understood. By the way, I wrote a simple article to announce the BOX3 release. (JA) https://qiita.com/KEINOS/items/62653805b554a538d970
Checking this issue again, I think what could be done is:
- Leveraging the Composer installer script
- Instead of going for a tedious and hard to maintain one script file, go for a separate project and ship it as a PHAR exactly like it is currently done for the requirement checker. In other words:
- Create an
installerdirectory which will contain the installer as a regular PHP projects, similar to therequirement-checkerone - That project needs to be PHP 5.3 compatible (like the requirement checker)
- Create an
- Work out what needs to be changed, from what I see it's mostly gonna be about how to retrieve the platform requirements
This will IMO makes things way easier to maintain.