A
A
Arman2017-12-21 12:25:56
PHP
Arman, 2017-12-21 12:25:56

What keys to run "composer install" on production?

So far I've come up with this:

composer install --no-dev --prefer-dist --no-scripts --optimize-autoloader --apcu-autoloader --quiet

--no-dev - do not raise dependencies for dev (tests, etc.)
--prefer-dist - only from dist (on the off site they write what will be faster)
--no-scripts - do not run scripts, I work with yii2 and like there were no scripts here, maybe there are some scripts in the dependencies?
--optimize-autoloader - autoloader optimization
--apcu-autoloader - use APCu
--quiet - do not show messages. Runs through gulp and there seems to be no point in these messages
Did you do anything extra here? Maybe forgot? I saw another launch separately:
composer dump-autoload --optimize --no-dev --quiet
but it seems like there is a repetition here?
How else can you optimize? Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2017-12-28
@Arik

Level 1: dump-autoload -oand --optimize-autoloaderit's the same thing.
Level 2A: dump-autoload -aand --classmap-authoritativeit's the same thing.
Level 2B: dump-autoload -acpuand --apcu-autoloaderit's the same thing.
Either Level 1 or Level 2A or Level 1 + Level 2B is used (as in your case). For sale, 2A or 1 + 2B is better.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question