D
D
dmitriy2017-08-31 16:37:09
Composer
dmitriy, 2017-08-31 16:37:09

Why doesn't --prefer-dist work when installing packages?

There is a private proxy server inside the company, we use satis which collects a dependency map with distributions, but for some reason, when installing composer install --prefer-dist
, packages from our server are cloned, and distributions are downloaded from external https://github.com .
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
voronkovich, 2017-09-01
@voronkovich

You may have dependencies listed as "dev-branch", in which case the composer will always clone the repository and checkout the specified branch (git checkout branch).
I'm not sure, but it seems that automatic creation of an archive for a tag is a github feature, this is not in the git (although there is a git archive command).

D
dmitriy, 2017-09-01
@dmitriylanets

in general, I figured it out myself, it turns out that the whole thing is in composer.lock, if it has already been formed and was installed without links to distributions, then install --prefer-dist will not work. If you delete it and recreate it again (essentially update), then the installation will go as it should, with a jump in distributions and much faster.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question