nanobox-io / nanobox-engine-php

Engine for running PHP apps on Nanobox
https://nanobox.io
MIT License
19 stars 15 forks source link

Add hirak/prestissimo plugin for composer #63

Open asenor opened 6 years ago

asenor commented 6 years ago

hirak/prestissimo speeds up composer install, by installing packages in parallel. As they mention, it can reduce composer install time from 288s to 26s in laravel project for example.

It requires to run composer global require hirak/prestissimo before composer install.

pablorsk commented 6 years ago

I'm thinking a temporary solution without forking this engine:

#boxfile.yml
run.config:
  engine: php
  engine.config:
    runtime: php-7.1
    composer_install: "(composer global show 2> /dev/null | grep prestissimo || composer global require hirak/prestissimo); composer install --no-interaction"

These commands are excecuted when you run, for example, nanobox run. First, check if prestissimo is installed; if not, run composer global require hirak/prestissimo.