box icon indicating copy to clipboard operation
box copied to clipboard

Add installer

Open theofidry opened this issue 8 years ago • 5 comments

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

theofidry avatar Nov 12 '17 23:11 theofidry

https://github.com/KEINOS/Phar_Box3_installer from #165

c33s avatar Apr 27 '18 00:04 c33s

Install via Homebrew

https://github.com/humbug/homebrew-box from https://github.com/humbug/box/issues/275 by @pierredup

Simple and easy 👍

KEINOS avatar Sep 12 '18 10:09 KEINOS

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)

theofidry avatar Sep 12 '18 11:09 theofidry

Aha! Understood. By the way, I wrote a simple article to announce the BOX3 release. (JA) https://qiita.com/KEINOS/items/62653805b554a538d970

KEINOS avatar Sep 12 '18 11:09 KEINOS

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 installer directory which will contain the installer as a regular PHP projects, similar to the requirement-checker one
    • That project needs to be PHP 5.3 compatible (like the requirement checker)
  • 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.

theofidry avatar Jun 07 '19 21:06 theofidry