L
L
LIAL2015-12-29 09:53:23
Yii
LIAL, 2015-12-29 09:53:23

How to disable package update in Composer?

I use composer to install the necessary modules and packages for YII2.
There was a need to change one of the packages and now so that my changes are not lost, I would like to disable its update, how can I do it right?
ZYZH I tried to comment out the line with this package in composer.json (but neither // nor # helps, the composer swears at this place)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Zelenin, 2015-12-29
@zelenin

so specify the specific version in composer.json. This will be enough. and if you wish, you can even specify a commit.

A
Alexey Shein, 2015-12-29
@conf

If you have a composer.lock file, then the composer first of all takes package versions from it (this file needs to be committed to the repository). Those. The next time you run composer install, the package versions specified in composer.lock will be installed.

R
Rikcon, 2015-12-29
@Rikcon

stackoverflow.com/questions/17314091/do-not-update...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question